feud.testgame.model
Class PlayerInfo

java.lang.Object
  extended byfeud.testgame.model.PlayerInfo

public class PlayerInfo
extends java.lang.Object

A simple wrapper class for a player's current state, i.e. the name and the number of frags/deaths.


Constructor Summary
PlayerInfo(java.lang.String name)
          Create a new player info
 
Method Summary
 int getFrags()
          Gets the number of frags.
 int getKilled()
          Gets the number of deaths.
 java.lang.String getName()
          Returns the player's name.
 void incFrags()
          Increment the number of frags.
 void incKilled()
          Increment the number of deaths.
 void reset()
          Resets the player's info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerInfo

public PlayerInfo(java.lang.String name)
Create a new player info

Parameters:
name - the player's name
Method Detail

getName

public java.lang.String getName()
Returns the player's name.

Returns:
String the name

reset

public void reset()
Resets the player's info.


incFrags

public void incFrags()
Increment the number of frags.


incKilled

public void incKilled()
Increment the number of deaths.


getFrags

public int getFrags()
Gets the number of frags.

Returns:
int the number of frags

getKilled

public int getKilled()
Gets the number of deaths.

Returns:
int the number of deaths