gizmoball.gameworld
Class Player

java.lang.Object
  extended by gizmoball.gameworld.Player

public class Player
extends java.lang.Object

A Player is an abstraction of a player in a game.

Specification Fields

Constructor Summary
Player(java.lang.String name, Counter lives, Counter score)
          If any parameter is null, it is interpreted as that this Player does not have that property (ie this Player does not have a set number of lives, or has no name)
 
Method Summary
 Counter getLives()
           
 Counter getScore()
           
 java.lang.String print()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Player

public Player(java.lang.String name,
              Counter lives,
              Counter score)
If any parameter is null, it is interpreted as that this Player does not have that property (ie this Player does not have a set number of lives, or has no name)

Effects:
creates a new player with this.name = name, this.lives = lives, this.score = score
Method Detail

getScore

public Counter getScore()
Returns:
this.score

getLives

public Counter getLives()
Returns:
this.lives

print

public java.lang.String print()
Returns:
a textual representation of this player's state for display