Uses of Class
net.royalur.model.Piece
Packages that use Piece
Package
Description
-
Uses of Piece in net.royalur
Methods in net.royalur with parameters of type PieceModifier and TypeMethodDescriptionGame.findMoveByPiece
(Piece piece) Finds the move of the piecepiece
.void
Moves the piecepiece
, and updates the state of the game. -
Uses of Piece in net.royalur.model
Methods in net.royalur.model that return PieceModifier and TypeMethodDescriptionGets the piece ontile
.Board.getByIndices
(int ix, int iy) Gets the piece on the tile at the indices (ix
,iy
), 0-based.Move.getCapturedPiece()
Gets the piece that will be captured by this move.Move.getCapturedPieceOrNull()
Gets the piece that will be captured by this move, or null if there is no piece that will be captured.Move.getDestPiece()
Gets the destination piece of this move.Move.getDestPieceOrNull()
Gets the destination piece of this move, or null if there is no destination piece, in the case where a piece is moved off the board.Move.getSourcePiece()
Gets the source piece of this move.Move.getSourcePieceOrNull()
Gets the source piece of this move, or null if there is no source piece, in the case where a new piece is moved onto the board.Sets the piece ontile
topiece
.Board.setByIndices
(int ix, int iy, Piece piece) Sets the piece on the tile at the indices (ix
,iy
), 0-based, to the piecepiece
.Methods in net.royalur.model with parameters of type PieceModifier and TypeMethodDescriptionSets the piece ontile
topiece
.Board.setByIndices
(int ix, int iy, Piece piece) Sets the piece on the tile at the indices (ix
,iy
), 0-based, to the piecepiece
.static char
Convertspiece
to a single character that can be used to textually represent the owner of a piece.Constructors in net.royalur.model with parameters of type Piece -
Uses of Piece in net.royalur.notation
Methods in net.royalur.notation that return PieceModifier and TypeMethodDescriptionJsonNotation.readNullablePiece
(RuleSet rules, com.fasterxml.jackson.databind.node.ObjectNode json, String key) JsonNotation.readOldPiece
(RuleSet rules, com.fasterxml.jackson.databind.node.ObjectNode json) JsonNotation.readPiece
(RuleSet rules, com.fasterxml.jackson.databind.node.ObjectNode json, String key) Methods in net.royalur.notation with parameters of type PieceModifier and TypeMethodDescriptionint
JsonNotation.encodePiece
(Piece piece) protected void
JsonNotation.writePieceField
(com.fasterxml.jackson.core.JsonGenerator generator, String fieldName, Piece piece) -
Uses of Piece in net.royalur.rules
Methods in net.royalur.rules that return PieceModifier and TypeMethodDescriptionPieceProvider.create
(PlayerType owner, int pathIndex) Generate a piece on the board.PieceProvider.createIntroduced
(PlayerType owner, int newPathIndex) Generates a new piece to be introduced to the board.PieceProvider.createMoved
(Piece originPiece, int newPathIndex) Generates a piece that has been moved from another tile on the board.Methods in net.royalur.rules with parameters of type PieceModifier 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.PieceProvider.createMoved
(Piece originPiece, int newPathIndex) Generates a piece that has been moved from another tile on the board. -
Uses of Piece in net.royalur.rules.simple
Methods in net.royalur.rules.simple that return PieceModifier and TypeMethodDescriptionSimplePieceProvider.create
(PlayerType owner, int pathIndex) SimplePieceProvider.createIntroduced
(PlayerType owner, int newPathIndex) SimplePieceProvider.createMoved
(Piece fromPiece, int newPathIndex) Methods in net.royalur.rules.simple with parameters of type PieceModifier and TypeMethodDescriptionSimplePlayerStateProvider.applyPieceCaptured
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.applyPieceIntroduced
(PlayerState playerState, Piece piece) SimplePlayerStateProvider.applyPieceScored
(PlayerState playerState, Piece piece) SimplePieceProvider.createMoved
(Piece fromPiece, int newPathIndex)