How to prevent an user entering into the room?

0 votes
Hi,

    i am working on turn based game.i am entering an user into my game  by sending notification.What will happen if a user tries to join a room in which already game being started?I don't want him to enter into the game, once the game  stated.Please help me.
asked Jul 14, 2014 in AppWarp by rkrishna (22 points)
recategorized Oct 24, 2014 by sushil

1 Answer

0 votes
Hey,

You can assign some property to a room to represent the state of the game i.e. started or not. For example you can set "isGameStarted" property to a room using updateRoomProperty() method. Whenever you are starting a game just set that porperty to true. Now Whenever a new player is going to join a room, you can use our matchmaking API joinRoomWIthProperty() to join a room which has this property set as false. When the game is over, revert back the the property to false value.
answered Jul 14, 2014 by Suyash Mohan (900 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...