I wonder if you know how you can. I do this after one player presses a button and finish the turn, another player will be able to make a move.
There are many ways to do this. If it were me, I would have a table of โmoveโ tables or something else, and keep track of who is moving there. Then, on the SetInterval() page, a javascript method that uses the ajax service to search in this table for โmoveโ and determine when users enable it.
When someone creates a room and how to close his browser - I need this room to be closed. Should I use Session_OnEnd to close the room it opened?
You can use Session_OnEnd . Alternatively, you can use the ajax method, which checks the moves table to see when the user hasnโt checked for x minutes, and then close the session.
source share