| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.fuckingbrit.q3astats.Player
The player class is used to encapsulate an urban terror player. A player is not intended to store self. A player will store the number of kills/deaths by each weapon and a count of suicides.
This class is not for tracking the primary player (Primary Player is the person who produced the log files) but for killing Enemy players.
 Kills - Number of time Player was killed by Primary Player
 Deaths - Number of times Primary Player was killed by Player
| Field Summary | |
|  java.lang.String | nameThe name of the player. | 
|  int | suicidesCount of suicides | 
|  java.util.Hashtable | weapons | 
| Constructor Summary | |
| Player(java.lang.String name)Player constructor with a player name specified. | |
| Method Summary | |
|  void | addDeath(java.lang.String weaponname)Routine to add a death by weapon: | 
|  void | addKill(java.lang.String weaponname)Routine to add a kill by weapon: | 
| protected  void | addWeapon(Weapon wep)For loading up internaly from parsing a pre-existing player XML | 
|  int | getDeaths()Routine to get total deaths of this player. | 
|  int | getDeathsBy(java.lang.String weaponname)Routine to get deaths by weapon | 
|  int | getKills()Routine to get total kills of this player. | 
|  int | getKillsBy(java.lang.String weaponname)Routine to get kills by weapon | 
|  java.lang.String | toString()Returns a string representation of this object. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public java.lang.String name
public int suicides
public java.util.Hashtable weapons
| Constructor Detail | 
public Player(java.lang.String name)
name - player character name (nick)| Method Detail | 
public void addKill(java.lang.String weaponname)
weaponname - string identifier for weapon.public void addDeath(java.lang.String weaponname)
weaponname - string identifier for weapon.public int getDeathsBy(java.lang.String weaponname)
weaponname - string identifier for weapon to count.
public int getKillsBy(java.lang.String weaponname)
weaponname - string identifier for weapon to count.
public int getKills()
public int getDeaths()
protected void addWeapon(Weapon wep)
public java.lang.String toString()
toString in class java.lang.Object| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||