public class HumanPigPlayer extends PigPlayer
| Constructor and Description |
|---|
HumanPigPlayer(String name)
The main constructor for
HumanPigPlayer. |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTurn(int myScore,
int opponentsScore)
Alert the human player that his/her turn is beginning.
|
boolean |
decideIfShouldRoll(int turnNumber,
int rollNumber,
int poolSize,
int myScore,
int opponentsScore)
Should the player roll again? This method just asks the human at the
keyboard.
|
public HumanPigPlayer(String name)
HumanPigPlayer.name - The HumanPigPlayer's namepublic void beginTurn(int myScore,
int opponentsScore)
public boolean decideIfShouldRoll(int turnNumber,
int rollNumber,
int poolSize,
int myScore,
int opponentsScore)
decideIfShouldRoll in class PigPlayerturnNumber - which turn the player is on (unused)rollNumber - which roll the player is on (unused)poolSize - the number of points currently in the poolmyScore - the number of points the player has already won (unused)opponentsScore - the number of points the opponent has already won
(unused)