Package net.royalur.model
Class Piece
java.lang.Object
net.royalur.model.Piece
A piece on a board.
-
Constructor Summary
ConstructorsConstructorDescriptionPiece(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
Convertspieceto a single character that can be used to textually represent the owner of a piece.- Parameters:
piece- The piece ornullto convert to a character.- Returns:
- The character representing
piece.
-