|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Player
Player is the class that represents the player of the marble game.
Constructor Summary | |
Player(int playerID)
Construct a Player. |
Method Summary | |
void |
addScore() Increment the score of this Player by 1. |
void |
addScore(int score)
Increment the score of this Player by the given addition value. |
int |
getPlayerID()
Get the ID of this Player. |
int |
getScore() Get the current score of this Player. |
boolean |
isTurn() Check if it is this Player's turn in the game. |
void |
setScore(int score)
Set the score of this Player to the given score. |
void |
setTurn(boolean flag)
Set the the turn flag for this player. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Player(int playerID)
playerID
- the identification of this PlayerMethod Detail |
public int getScore()
public void addScore()
public void addScore(int score)
score
- the addition value to be added to this Player's scorepublic void setScore(int score)
score
- the score to which this Player's score is to be setpublic int getPlayerID()
public void setTurn(boolean flag)
flag
- the flag to which this player's turn status is to be setpublic boolean isTurn()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |