Package net.royalur.rules.state
Class WaitingForMoveGameState
java.lang.Object
net.royalur.rules.state.GameState
net.royalur.rules.state.OngoingGameState
net.royalur.rules.state.PlayableGameState
net.royalur.rules.state.WaitingForMoveGameState
A game state where the game is waiting for a player to make a move.
-
Constructor Summary
ConstructorDescriptionWaitingForMoveGameState
(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. -
Method Summary
Methods inherited from class net.royalur.rules.state.PlayableGameState
isPlayable
Methods inherited from class net.royalur.rules.state.OngoingGameState
getSubject, getTurn, getTurnPlayer, getWaiting, getWaitingPlayer, isFinished
Methods inherited from class net.royalur.rules.state.GameState
getBoard, getDarkPlayer, getLightPlayer, getPlayerState, getTimeSinceGameStartMs
-
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
Gets the roll that the player made.- Returns:
- The roll that the player made.
-
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
Description copied from class:GameState
Generates an English text description of the state of the game. -
equals
- Overrides:
equals
in classPlayableGameState
-