Uses of Enum Class
net.royalur.model.PlayerType
Package
Description
-
Uses of PlayerType in net.royalur
Modifier and TypeMethodDescriptionGame.getAbandoningPlayer()
Gets the player that abandoned the game.Game.getLoser()
Gets the player that lost the game.Game.getResigningPlayer()
Gets the player that resigned from this game.Game.getTurn()
Gets the player who can make the next interaction with the game.Game.getTurnOrWinner()
Gets the player who can make the next interaction with the game, or the winner of the game if it is finished.Game.getWaiting()
Gets the player that is waiting whilst the other player makes the next interaction with the game.Game.getWinner()
Gets the player that won the game.Modifier and TypeMethodDescriptionvoid
Game.abandon
(AbandonReason reason, PlayerType player) Marks that the game was abandoned due toreason
.Game.getPlayer
(PlayerType player) Gets the current state of the playerplayer
.boolean
Game.hasPlayerMadeAnyActions
(PlayerType player) Checks whether the given player has made any actions in this game.boolean
Game.hasPlayerMadeAnyMoves
(PlayerType player) Checks whether the given player has made any moves in this game.void
Game.resign
(PlayerType player) Marks thatplayer
resigned the game. -
Uses of PlayerType in net.royalur.model
Modifier and TypeMethodDescriptionstatic PlayerType
PlayerType.getByChar
(char character) Finds the player associated with the given character.PlayerType.getOtherPlayer()
Retrieves the PlayerType representing the other player.Piece.getOwner()
Gets the player that owns this piece.Move.getPlayer()
Gets the instigator of this move.PlayerState.getPlayer()
Gets the player that this state represents.static PlayerType
Returns the enum constant of this class with the specified name.static PlayerType[]
PlayerType.values()
Returns an array containing the constants of this enum class, in the order they are declared.Modifier and TypeMethodDescriptionint
Board.countPieces
(PlayerType player) Counts the number of pieces that are on the board forplayer
.static char
PlayerType.toChar
(PlayerType player) Convertsplayer
to a single character that can be used to textually represent a piece.ModifierConstructorDescriptionMove
(PlayerType player, Tile source, Piece sourcePiece, Tile dest, Piece destPiece, Piece capturedPiece) Creates a new move with originsource
and destinationdest
.Piece
(PlayerType owner, int pathIndex) Instantiates a piece that can be placed on a board.PlayerState
(PlayerType player, int pieceCount, int score) Instantiates a state for a player in a game. -
Uses of PlayerType in net.royalur.model.path
Modifier and TypeMethodDescriptionPathPair.get
(PlayerType player) Gets the path ofplayer
, excluding the start and end tiles that exist off the board.PathPair.getEnd
(PlayerType player) Gets the end tile ofplayer
that exists off the board.PathPair.getStart
(PlayerType player) Gets the start tile ofplayer
, which exists off the board.PathPair.getWithStartEnd
(PlayerType player) Gets the path ofplayer
, including the start and end tiles that exist off the board. -
Uses of PlayerType in net.royalur.notation
Modifier and TypeMethodDescriptionDerivedStateSource.createAbandonedState
(RuleSet rules, long timeSinceGameStartMs, AbandonReason reason, PlayerType player) FullStateSource.createAbandonedState
(RuleSet rules, long timeSinceGameStartMs, AbandonReason abandonReason, PlayerType player) abstract AbandonedGameState
StateSource.createAbandonedState
(RuleSet rules, long timeSinceGameStartMs, AbandonReason abandonReason, PlayerType player) DerivedStateSource.createEndState
(RuleSet rules, long timeSinceGameStartMs, PlayerType winner) FullStateSource.createEndState
(RuleSet rules, long timeSinceGameStartMs, PlayerType winner) abstract EndGameState
StateSource.createEndState
(RuleSet rules, long timeSinceGameStartMs, PlayerType winner) DerivedStateSource.createMovedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) FullStateSource.createMovedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) abstract MovedGameState
StateSource.createMovedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll, Move move) DerivedStateSource.createResignedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType player) FullStateSource.createResignedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType player) abstract ResignedGameState
StateSource.createResignedState
(RuleSet rules, long timeSinceGameStartMs, PlayerType player) DerivedStateSource.createRolledState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) FullStateSource.createRolledState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) abstract RolledGameState
StateSource.createRolledState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) DerivedStateSource.createWaitingForMoveState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) FullStateSource.createWaitingForMoveState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) abstract WaitingForMoveGameState
StateSource.createWaitingForMoveState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn, Roll roll) DerivedStateSource.createWaitingForRollState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn) FullStateSource.createWaitingForRollState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn) abstract WaitingForRollGameState
StateSource.createWaitingForRollState
(RuleSet rules, long timeSinceGameStartMs, PlayerType turn) JsonNotation.readAbandonedState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, PlayerType player) JsonNotation.readActionState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, String stateType, PlayerType turn) JsonNotation.readMovedState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, PlayerType turn) JsonNotation.readPlayableState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, String stateType, PlayerType turn) JsonNotation.readPlayerState
(RuleSet rules, PlayerType playerType, com.fasterxml.jackson.databind.node.ObjectNode json) JsonNotation.readResignedState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, PlayerType player) JsonNotation.readRolledState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, PlayerType turn) JsonNotation.readWaitingForMoveState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, PlayerType turn) JsonNotation.readWaitingForRollState
(RuleSet rules, long timeSinceGameStartMs, StateSource stateSource, com.fasterxml.jackson.databind.node.ObjectNode json, PlayerType turn) -
Uses of PlayerType in net.royalur.rules
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.PieceProvider.create
(PlayerType owner, int pathIndex) Generate a piece on the board.PlayerStateProvider.create
(PlayerType player, int pieces, int score) Generates a state for theplayer
player.PieceProvider.createIntroduced
(PlayerType owner, int newPathIndex) Generates a new piece to be introduced to the board.PlayerStateProvider.createStartingState
(PlayerType player) Generates the starting state for theplayer
player. -
Uses of PlayerType in net.royalur.rules.simple
Modifier and TypeMethodDescriptionSimplePieceProvider.create
(PlayerType owner, int pathIndex) SimplePlayerStateProvider.create
(PlayerType player, int pieces, int score) SimplePieceProvider.createIntroduced
(PlayerType owner, int newPathIndex) SimplePlayerStateProvider.createStartingState
(PlayerType player) -
Uses of PlayerType in net.royalur.rules.state
Modifier and TypeMethodDescriptionEndGameState.getLoser()
Gets the player that lost the game.ControlGameState.getPlayer()
Gets the player that performed the control action.ControlGameState.getSubject()
EndGameState.getSubject()
abstract PlayerType
GameState.getSubject()
Get the subject player of the game state.OngoingGameState.getSubject()
OngoingGameState.getTurn()
Gets the player who can make the next interaction with the game.OngoingGameState.getWaiting()
Gets the player that is waiting whilst the other player makes the next interaction with the game.EndGameState.getWinner()
Gets the player that won the game.Modifier and TypeMethodDescriptionGameState.getPlayerState
(PlayerType player) Gets the state of the playerplayer
.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, 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.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. -
Uses of PlayerType in net.royalur.stats
Modifier and TypeMethodDescriptionGameStatsTarget.getAssociatedPlayer()
Gets the specific player associated with this target.Modifier and TypeMethodDescriptionstatic GameStatsTarget
GameStatsTarget.get
(PlayerType player) Retrieves the target associated withplayer
.int
GameStats.getDrama
(PlayerType player) Gets the number of times thatplayer
took the lead from behind.int
GameStats.getMoves
(PlayerType player) Gets the number of moves made byplayer
.int
GameStats.getRolls
(PlayerType player) Gets the number of rolls performed byplayer
.int
GameStats.getTurns
(PlayerType player) Gets the number of turns thatplayer
had.