java.lang.Object | +--PongScore
This class desribes objects that are used to track the player's scores in a game of Pong. Each PongScore object will keep the score for a single player.
Constructor Summary | |
PongScore()
Construct a new PongScore object with an initial score of zero points. |
Method Summary | |
int |
getScore()
Return the current score of this PongScore object. |
void |
scorePoints(int points)
Increase the current score of this PongScore object by points. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PongScore()
Method Detail |
public int getScore()
public void scorePoints(int points)
points
- the number of points to add to the
score.