Package net.royalur.model
Class PlayerState
java.lang.Object
net.royalur.model.PlayerState
A player state represents the state of a single player at a point in the game.
This includes the player's score and number of pieces left to play.
-
Constructor Summary
ConstructorDescriptionPlayerState
(PlayerType player, int pieceCount, int score) Instantiates a state for a player in a game. -
Method Summary
-
Constructor Details
-
PlayerState
Instantiates a state for a player in a game.- Parameters:
player
- The player that this state represents.pieceCount
- The number of pieces that the player has available to introduce to the board.score
- The number of pieces that the player has taken off the board.
-
-
Method Details
-
getPlayer
Gets the player that this state represents.- Returns:
- The player that this state represents.
-
getPieceCount
public int getPieceCount()Gets the number of pieces that the player has available to introduce to the board.- Returns:
- The number of pieces that the player has available to introduce to the board.
-
getScore
public int getScore()Gets the number of pieces that the player has taken off the board.- Returns:
- The number of pieces that the player has taken off the board.
-
hashCode
public int hashCode() -
equals
-
toString
-