Skip to content

Change game start condition to check state of the player list #4

Closed
@LearningNerd

Description

@LearningNerd

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions