cz.cuni.pogamut.Client
Class AgentStats
java.lang.Object
cz.cuni.pogamut.Client.AgentStats
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ModifiableAgentStats
public class AgentStats
- extends java.lang.Object
- implements java.io.Serializable
Wrapper for Agent's collectiong various statistical information. Eg.:
- Damage caused
- Players killed
- Damage suffered
- Number the bot hitted a wall
- TODO add more
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
agent
protected transient Agent agent
frags
protected int frags
deaths
protected int deaths
damageCaused
protected int damageCaused
damageSuffered
protected int damageSuffered
wallHits
protected int wallHits
teamScore
protected double teamScore
enemyTeamScore
protected double enemyTeamScore
rocketHits
protected int rocketHits
extra
protected java.io.Serializable extra
AgentStats
public AgentStats(Agent agent)
- Creates new instance of statiscics collector for an agent.
- Parameters:
agent
- Agent whose statistics are to be collected.
AgentStats
public AgentStats()
getAgent
protected Agent getAgent()
- Returns:
- Agent whose statistics are to be collected.
setAgent
public void setAgent(Agent agent)
registerListeners
private void registerListeners()
getFrags
public int getFrags()
- Returns:
- Number of bots killed by this bot.
getExtra
public java.io.Serializable getExtra()
setExtra
public void setExtra(java.io.Serializable extra)
getDeaths
public int getDeaths()
- Returns:
- How many times was this bot killed.
getDamageCaused
public int getDamageCaused()
- Returns:
- How much damage caused the bot to the other bots.
getDamageSuffered
public int getDamageSuffered()
- Returns:
- How much damage the bot suffered.
toString
public java.lang.String toString()
- String reprezentation of stats object is automaticaly build using the
introspection. All properties are added to the string.
- Overrides:
toString
in class java.lang.Object
- Returns:
- String with all properties and their values
getTeamScore
public double getTeamScore()
getEnemyTeamScore
public double getEnemyTeamScore()
plus
public void plus(AgentStats s)
- Adds (+) given stats to this object. Useful for stats agregation.
- Parameters:
s
-
getWallHits
public int getWallHits()