The game play at the end of the game isn't very clear.
Bug: If you leave a browser open, the game will restart every 10 minutes,
but the browser won't indicate this.
- Include game number in all server requests so that if the game ends or
restarts during a network outage, the results won't be misinterpreted. Use
a random game number or the current time in case the server is bounced.
- When the tile count hits zero, replace the Flip button with a Done
button.
- Clicking the Done button should cause "Done" to appear by your name.
- When everybody who's flipping is done, a message is broadcast with the
winner's name and the gameover command is sent.
- A minute later, the game is cleared and the game number if bumped.
- The gameover command causes all the clients to disable everything and
add a button to go back to the home page.
- When a client asks for changes for a game number that isn't current,
reply with a single command: gameover.
- Optional: Broadcast warning messages periodically before deleting the
game after 10 minutes of inactivity.