Uses of Class
net.royalur.model.PlayerState
Package
Description
-
Uses of PlayerState in net.royalur
Modifier and TypeMethodDescriptionGame.getDarkPlayer()
Gets the current state of the dark player.Game.getLightPlayer()
Gets the current state of the light player.Game.getLosingPlayer()
Gets the state of the losing player.Game.getPlayer
(PlayerType player) Gets the current state of the playerplayer
.Game.getTurnPlayer()
Gets the state of the player whose turn it is.Game.getWaitingPlayer()
Gets the state of the player that is waiting as it is not their turn.Game.getWinningPlayer()
Gets the state of the winning player. -
Uses of PlayerState in net.royalur.notation
Modifier and TypeMethodDescriptionJsonNotation.readPlayerState
(RuleSet rules, PlayerType playerType, com.fasterxml.jackson.databind.node.ObjectNode json) Modifier and TypeMethodDescriptionvoid
JsonNotation.writePlayerState
(com.fasterxml.jackson.core.JsonGenerator generator, PlayerState playerState) ModifierConstructorDescriptionFullStateSource
(Board board, PlayerState lightPlayer, PlayerState darkPlayer) -
Uses of PlayerState in net.royalur.rules
Modifier and TypeMethodDescriptionPlayerStateProvider.applyPieceCaptured
(PlayerState playerState, Piece piece) Generates a new player state that is a copy ofplayerState
, with the given piece captured.PlayerStateProvider.applyPieceIntroduced
(PlayerState playerState, Piece piece) Generates a new player state that is a copy ofplayerState
, with the given piece introduced to the board.PlayerStateProvider.applyPieceScored
(PlayerState playerState, Piece piece) Generates a new player state that is a copy ofplayerState
, with the given piece scored.PlayerStateProvider.create
(PlayerType player, int pieces, int score) Generates a state for theplayer
player.PlayerStateProvider.createStartingState
(PlayerType player) Generates the starting state for theplayer
player.Modifier and TypeMethodDescriptionPlayerStateProvider.applyPieceCaptured
(PlayerState playerState, Piece piece) Generates a new player state that is a copy ofplayerState
, with the given piece captured.PlayerStateProvider.applyPieceIntroduced
(PlayerState playerState, Piece piece) Generates a new player state that is a copy ofplayerState
, with the given piece introduced to the board.PlayerStateProvider.applyPieceScored
(PlayerState playerState, Piece piece) Generates a new player state that is a copy ofplayerState
, with the given piece scored.RuleSet.findAvailableMoves
(Board board, PlayerState player, Roll roll) Finds all available moves from the given state. -
Uses of PlayerState in net.royalur.rules.simple
Modifier and TypeMethodDescriptionSimplePlayerStateProvider.applyPieceCaptured
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.applyPieceIntroduced
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.applyPieceScored
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.create
(PlayerType player, int pieces, int score) SimplePlayerStateProvider.createStartingState
(PlayerType player) Modifier and TypeMethodDescriptionSimplePlayerStateProvider.applyPieceCaptured
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.applyPieceIntroduced
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.applyPieceScored
(PlayerState playerState, Piece piece) SimpleRuleSet.findAvailableMoves
(Board board, PlayerState player, Roll roll) -
Uses of PlayerState in net.royalur.rules.simple.fast
-
Uses of PlayerState in net.royalur.rules.state
Modifier and TypeMethodDescriptionGameState.getDarkPlayer()
Get the state of the dark player.GameState.getLightPlayer()
Get the state of the light player.EndGameState.getLosingPlayer()
Gets the state of the player that lost the game.GameState.getPlayerState
(PlayerType player) Gets the state of the playerplayer
.OngoingGameState.getTurnPlayer()
Gets the state of the player that we are waiting on to interact with the game.OngoingGameState.getWaitingPlayer()
Gets the state of the player that is waiting whilst the other player makes the next interaction with the game.EndGameState.getWinningPlayer()
Gets the state of the player that won the game.ModifierConstructorDescriptionAbandonedGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, AbandonReason reason, PlayerType player) Instantiates a game state representing a game being abandoned.ActionGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn) Instantiates a game state for an ongoing point in a game.ControlGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs) Instantiates a game state for a control action.ControlGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType player) Instantiates a game state for a control action.EndGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType winner) Instantiates a game state where a player has won the game.GameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs) Instantiates a game state.MovedGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) Instantiates a game state representing a move that was made in a game.OngoingGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn) Instantiates a game state for an ongoing point in a game.PlayableGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn) Instantiates a game state for an ongoing point in a game.ResignedGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType player) Instantiates a game state representing a player resigning from a game.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.WaitingForMoveGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn, Roll roll, List<Move> availableMoves) Instantiates a game state where the game is waiting for a player to make a move.WaitingForRollGameState
(Board board, PlayerState lightPlayer, PlayerState darkPlayer, long timeSinceGameStartMs, PlayerType turn) Instantiates a game state where the game is waiting for a player to roll the dice.