Package net.royalur.model
Class Piece
java.lang.Object
net.royalur.model.Piece
A piece on a board.
-
Constructor Summary
ConstructorDescriptionPiece
(PlayerType owner, int pathIndex) Instantiates a piece that can be placed on a board. -
Method Summary
-
Constructor Details
-
Piece
Instantiates a piece that can be placed on a board.- Parameters:
owner
- The player that owns the piece.pathIndex
- The index of this piece on its owner's path around the board.
-
-
Method Details
-
getOwner
Gets the player that owns this piece.- Returns:
- The player that owns this piece.
-
getPathIndex
public int getPathIndex()Gets the path index of this piece.- Returns:
- The path index of this piece.
-
hashCode
public int hashCode() -
equals
-
toString
-
toChar
Convertspiece
to a single character that can be used to textually represent the owner of a piece.- Parameters:
piece
- The piece ornull
to convert to a character.- Returns:
- The character representing
piece
.
-