Package net.royalur.rules.state
Class AbandonedGameState
java.lang.Object
net.royalur.rules.state.GameState
net.royalur.rules.state.ControlGameState
net.royalur.rules.state.AbandonedGameState
A game state that represents a game being abandoned.
-
Constructor Summary
ConstructorDescriptionAbandonedGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, AbandonReason reason, PlayerType player) Instantiates a game state representing a game being abandoned. -
Method Summary
Methods inherited from class net.royalur.rules.state.ControlGameState
getPlayer, getSubject, hasPlayer, isFinished, isPlayable
Methods inherited from class net.royalur.rules.state.GameState
getBoard, getDarkPlayer, getLightPlayer, getPlayerState, getTimeSinceGameStartMs
-
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, ornull
if the game was not abandoned by a specific player.
-
-
Method Details
-
getReason
Gets the reason that the game was abandoned.- Returns:
- The reason that the game was abandoned.
-
describe
Description copied from class:GameState
Generates an English text description of the state of the game. -
equals
- Overrides:
equals
in classControlGameState
-