Game¶
sealed class Game
A state of the game.
Instances are immutable. Each instance provides methods to advance the game state, which returns a new instance.
To create the initial game state, use newGame.
Game flow:
-
GameNotStarted: players are registering, the game has not started yet -
GameNewTurn: game is in progress -
GameFinished: one of the players has won
Inheritors¶
Properties¶
players¶
The set of players in the game.
This set is immutable and ordered: the players will play in the order in which they appear in this set.