Package net.royalur.rules.state
Class RolledGameState
java.lang.Object
net.royalur.rules.state.GameState
net.royalur.rules.state.OngoingGameState
net.royalur.rules.state.ActionGameState
net.royalur.rules.state.RolledGameState
A game state that represents a roll that was made in a game.
-
Constructor Summary
ConstructorDescriptionRolledGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn, Roll roll, List<Move> availableMoves) Instantiates a game state that represents a roll that was made in a game. -
Method Summary
Methods inherited from class net.royalur.rules.state.ActionGameState
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
-
RolledGameState
public RolledGameState(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn, Roll roll, List<Move> availableMoves) Instantiates a game state that represents a roll that was made in a game.- 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 roll the dice.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 from this position using the given roll.
-
-
Method Details
-
getRoll
Gets the roll that the player made.- Returns:
- The roll that the player made.
-
getAvailableMoves
Gets the moves that are available from this position using the given roll.- Returns:
- The moves that are available from this position using the given roll.
-
describe
Description copied from class:GameState
Generates an English text description of the state of the game. -
equals
- Overrides:
equals
in classActionGameState
-