Package net.royalur.notation
Class StateSource
java.lang.Object
net.royalur.notation.StateSource
- Direct Known Subclasses:
DerivedStateSource
,FullStateSource
Produces game states from serialised information.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract AbandonedGameState
createAbandonedState
(RuleSet rules, long timeSinceGameStartMs, AbandonReason abandonReason, PlayerType player) abstract EndGameState
createEndState
(RuleSet rules, long timeSinceGameStartMs, PlayerType winner) abstract MovedGameState
createMovedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) abstract ResignedGameState
createResignedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType player) abstract RolledGameState
createRolledState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) abstract WaitingForMoveGameState
createWaitingForMoveState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) abstract WaitingForRollGameState
createWaitingForRollState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn)
-
Constructor Details
-
StateSource
public StateSource()
-
-
Method Details
-
createRolledState
public abstract RolledGameState createRolledState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) -
createMovedState
public abstract MovedGameState createMovedState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) -
createWaitingForRollState
public abstract WaitingForRollGameState createWaitingForRollState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn) -
createWaitingForMoveState
public abstract WaitingForMoveGameState createWaitingForMoveState(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) -
createResignedState
public abstract ResignedGameState createResignedState(RuleSet rules, long timeSinceGameStartMs, PlayerType player) -
createAbandonedState
public abstract AbandonedGameState createAbandonedState(RuleSet rules, long timeSinceGameStartMs, AbandonReason abandonReason, @Nullable PlayerType player) -
createEndState
public abstract EndGameState createEndState(RuleSet rules, long timeSinceGameStartMs, @Nullable PlayerType winner)
-