Uses of Class
net.royalur.rules.state.GameState
Package
Description
-
Uses of GameState in net.royalur
Modifier and TypeMethodDescriptionGame.getState()
Retrieve the state that the game is currently in.Modifier and TypeMethodDescriptionGame.getLandmarkStates()
Gets all moves that were made in the game, as well as the current state of the game.Game.getStates()
Gets the states that have occurred so far in the game.Modifier and TypeMethodDescriptionvoid
Adds the statestate
to this game.Modifier and TypeMethodDescriptionvoid
Adds all states fromstates
to this game.ModifierConstructorDescriptionGame
(RuleSet rules, GameMetadata metadata, List<GameState> states) Instantiates a game of the Royal Game of Ur. -
Uses of GameState in net.royalur.lut
Modifier and TypeMethodDescriptiondouble
Lut.getLightWinPercent
(GameState state) Assumes that the game is using symmetrical paths. -
Uses of GameState in net.royalur.notation
Modifier and TypeMethodDescriptionJsonNotation.readCompleteState
(RuleSet rules, com.fasterxml.jackson.databind.node.ObjectNode json) JsonNotation.readDerivedState
(RuleSet rules, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json) Modifier and TypeMethodDescriptionDerivedStateSource.getAllStates()
JsonNotation.readStates
(RuleSet rules, GameState initialState, com.fasterxml.jackson.databind.node.ArrayNode json) Modifier and TypeMethodDescriptionJsonNotation.getStateType
(GameState state) int
DerivedStateSource.lastIndexOf
(GameState state) JsonNotation.readStates
(RuleSet rules, GameState initialState, com.fasterxml.jackson.databind.node.ArrayNode json) void
JsonNotation.writeCompleteState
(com.fasterxml.jackson.core.JsonGenerator generator, GameState state) void
JsonNotation.writeDerivedState
(com.fasterxml.jackson.core.JsonGenerator generator, GameState state) Modifier and TypeMethodDescriptionvoid
JsonNotation.writeStates
(com.fasterxml.jackson.core.JsonGenerator generator, List<GameState> states) -
Uses of GameState in net.royalur.rules
Modifier and TypeMethodDescriptionabstract GameState
RuleSet.generateInitialGameState()
Generates the initial state for a game.Modifier and TypeMethodDescriptionRuleSet.applyAbandon
(GameState state, long timeSinceGameStartMs, AbandonReason reason, PlayerType player) Applies an abandonment of the game due toreason
.RuleSet.applyMove
(WaitingForMoveGameState state, long timeSinceGameStartMs, Move move) Appliesmove
tostate
to generate the new state of the game.RuleSet.applyResign
(GameState state, long timeSinceGameStartMs, PlayerType player) Applies a resignation byplayer
to generate the new state of the game.RuleSet.applyRoll
(WaitingForRollGameState state, long timeSinceGameStartMs, Roll roll) Appliesroll
tostate
to generate the new state of the game.RuleSet.selectLandmarkStates
(List<GameState> states) Selects only the states that are required to reproduce exactly what happened in a game using this rule set.Modifier and TypeMethodDescriptionRuleSet.applyAbandon
(GameState state, long timeSinceGameStartMs, AbandonReason reason, PlayerType player) Applies an abandonment of the game due toreason
.RuleSet.applyResign
(GameState state, long timeSinceGameStartMs, PlayerType player) Applies a resignation byplayer
to generate the new state of the game.Modifier and TypeMethodDescriptionRuleSet.selectLandmarkStates
(List<GameState> states) Selects only the states that are required to reproduce exactly what happened in a game using this rule set. -
Uses of GameState in net.royalur.rules.simple
Modifier and TypeMethodDescriptionSimpleRuleSet.applyMove
(WaitingForMoveGameState state, long timeSinceGameStartMs, Move move) SimpleRuleSet.applyRoll
(WaitingForRollGameState state, long timeSinceGameStartMs, Roll roll) SimpleRuleSet.selectLandmarkStates
(List<GameState> states) -
Uses of GameState in net.royalur.rules.simple.fast
-
Uses of GameState in net.royalur.rules.state
Modifier and TypeClassDescriptionclass
A game state that represents a game being abandoned.class
A game state that is included in the middle of a game to record an action that was taken, but that is not a valid state to be in.class
A game state that records a control action that was made.class
A game state where a player has won the game.class
A game state that represents a move of a piece on the board.class
A game state from within a game where a winner has not yet been determined.class
A game state where we are waiting for interactions from a player.class
A game state that represents a player resigning from a game.class
A game state that represents a roll that was made in a game.class
A game state where the game is waiting for a player to make a move.class
A game state where the game is waiting for a player to roll the dice.