lukew3 / congol

Conway's game of life for 2 players
https://congol.net
GNU General Public License v3.0
4 stars 0 forks source link

Allow players to rejoin after they exit? #37

Open lukew3 opened 2 years ago

lukew3 commented 2 years ago

Because playerId is determined by the number of users in a room, when a player exits or refreshes their page, their playerId is set to player 1 or -1, even if they were player 0 before. Should they be able to get their place back or forfeit the game.

If they are not logged in, the game should end, and the remaining player should be moved to player 0. If they are not, the game should tell the remaining user to wait for them to reconnect.