Class AbandonedGameState


public class AbandonedGameState extends ControlGameState
A game state that represents a game being abandoned.
  • Constructor Details

    • AbandonedGameState

      public AbandonedGameState(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, AbandonReason reason, @Nullable PlayerType player)
      Instantiates a game state representing a game being abandoned.
      Parameters:
      board - The state of the pieces on the board.
      lightPlayer - The state of the light player.
      darkPlayer - The state of the dark player.
      timeSinceGameStartMs - The time this state was created.
      reason - The reason that the game was abandoned.
      player - The player that abandoned the game, or null if the game was not abandoned by a specific player.
  • Method Details

    • getReason

      public AbandonReason getReason()
      Gets the reason that the game was abandoned.
      Returns:
      The reason that the game was abandoned.
    • describe

      public String describe()
      Description copied from class: GameState
      Generates an English text description of the state of the game.
      Specified by:
      describe in class GameState
      Returns:
      An English text description of the state of the game.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ControlGameState