Package net.royalur.notation
Class FullStateSource
java.lang.Object
net.royalur.notation.StateSource
net.royalur.notation.FullStateSource
Produces game states from scratch.
-
Constructor Summary
ConstructorDescriptionFullStateSource
(Board board, PlayerState lightPlayer, PlayerState darkPlayer) -
Method Summary
Modifier and TypeMethodDescriptioncreateAbandonedState
(RuleSet rules, long timeSinceGameStartMs, AbandonReason abandonReason, PlayerType player) createEndState
(RuleSet rules, long timeSinceGameStartMs, PlayerType winner) createMovedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) createResignedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType player) createRolledState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) createWaitingForMoveState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) createWaitingForRollState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn)
-
Constructor Details
-
FullStateSource
-
-
Method Details
-
createRolledState
public RolledGameState createRolledState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) - Specified by:
createRolledState
in classStateSource
-
createMovedState
public MovedGameState createMovedState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) - Specified by:
createMovedState
in classStateSource
-
createWaitingForRollState
public WaitingForRollGameState createWaitingForRollState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn) - Specified by:
createWaitingForRollState
in classStateSource
-
createWaitingForMoveState
public WaitingForMoveGameState createWaitingForMoveState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) - Specified by:
createWaitingForMoveState
in classStateSource
-
createResignedState
public ResignedGameState createResignedState(RuleSet rules, long timeSinceGameStartMs, PlayerType player) - Specified by:
createResignedState
in classStateSource
-
createAbandonedState
public AbandonedGameState createAbandonedState(RuleSet rules, long timeSinceGameStartMs, AbandonReason abandonReason, @Nullable PlayerType player) - Specified by:
createAbandonedState
in classStateSource
-
createEndState
public EndGameState createEndState(RuleSet rules, long timeSinceGameStartMs, @Nullable PlayerType winner) - Specified by:
createEndState
in classStateSource
-