Class WaitingForMoveGameState


public class WaitingForMoveGameState extends PlayableGameState
A game state where the game is waiting for a player to make a move.
  • Constructor Details

    • WaitingForMoveGameState

      public WaitingForMoveGameState(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn, Roll roll, List<Move> availableMoves)
      Instantiates a game state where the game is waiting for a player to make a move.
      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.
      turn - The player who can make the next move.
      roll - The value of the dice that was rolled that can be used as the number of places to move a piece.
      availableMoves - The moves that are available to be made from this position.
  • Method Details

    • getRoll

      public Roll getRoll()
      Gets the roll that the player made.
      Returns:
      The roll that the player made.
    • getAvailableMoves

      public List<Move> getAvailableMoves()
      Gets the moves that are available to be made from this position.
      Returns:
      The moves that are available to be made from this position.
    • 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 PlayableGameState