§ Player()
Constructor for the player.
sets the current life is the full life (3).
§ checkLoss()
boolean model.Player.checkLoss |
( |
| ) |
|
checks whether the player loses the game or not
- Returns
- a boolean that is used to indicate whether the player is losing or not
§ decrementLife()
void model.Player.decrementLife |
( |
| ) |
|
loses score if the ball touches his/her border.
decreases the number of life by 1.
§ getScore()
int model.Player.getScore |
( |
| ) |
|
gets the score of a player
- Returns
- playerScore returns the score of the player .
§ LIFE
final int model.Player.LIFE = 3 |
|
private |
Defines constant number of life of a player
- the player has 3 lives in total
- the player loses if the number of life is 0
§ NOLIFE
final int model.Player.NOLIFE = 0 |
|
private |
§ score
Defines the current number of life of the player.
The documentation for this class was generated from the following file: