Closed
Description
Currently, the server is checking if timerId
is null to determine whether the game is in progress. But it would be more intuitive to check the player list; if there are players logged in, start the game! If not, stop the game.
Other options (which seem less intuitive) include:
- Check if the turn index is null or -1 (but this seems unintuitive too!)
- Use a
gameRunning
Boolean to track whether the game is in progress or not (but why create extra variables if I don't need them?