I need to create a game room dynamically for only 2 users. How can I create a different room dynamically if the room created earlier has 2 users in it already.
What I need exactly is, if there are 0 users currently connected and then (user1) connects, he gets to create a game room. The next (user2) connecting gets to join the room already created by the (user1), instead of creating a game room of his own. The next user connecting (user3) then creates a game room of his own as no room is available for him to join. Later (user4) connects and he gets to join the room created by (user3) instead of creating a room of his own. This goes on and on for every ODD user being my first player and the EVEN being my second player.
Need help with this.
Thanks,
Iceheros
