Package robocode.control
Class RobotResults
- java.lang.Object
-
- robocode.BattleResults
-
- robocode.control.RobotResults
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BattleResults>
public class RobotResults extends BattleResults
Contains the battle results for an individual robot- Author:
- Mathew A. Nelson (original), Flemming N. Larsen (contributor)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class robocode.BattleResults
bulletDamage, bulletDamageBonus, firsts, lastSurvivorBonus, ramDamage, ramDamageBonus, rank, score, seconds, survival, teamLeaderName, thirds
-
-
Constructor Summary
Constructors Constructor Description RobotResults(RobotSpecification robot, java.lang.String teamLeaderName, int rank, double score, double survival, double lastSurvivorBonus, double bulletDamage, double bulletDamageBonus, double ramDamage, double ramDamageBonus, int firsts, int seconds, int thirds)
Constructs a new RobotResults.RobotResults(RobotSpecification robot, BattleResults results)
Constructs new RobotResults based on aRobotSpecification
andBattleResults
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RobotResults[]
convertResults(BattleResults[] results)
Converts an array ofBattleResults
into an array ofRobotResults
.boolean
equals(java.lang.Object obj)
RobotSpecification
getRobot()
Returns the robot these results are meant for.int
hashCode()
-
Methods inherited from class robocode.BattleResults
compareTo, getBulletDamage, getBulletDamageBonus, getFirsts, getLastSurvivorBonus, getRamDamage, getRamDamageBonus, getRank, getScore, getSeconds, getSurvival, getTeamLeaderName, getThirds
-
-
-
-
Constructor Detail
-
RobotResults
public RobotResults(RobotSpecification robot, java.lang.String teamLeaderName, int rank, double score, double survival, double lastSurvivorBonus, double bulletDamage, double bulletDamageBonus, double ramDamage, double ramDamageBonus, int firsts, int seconds, int thirds)
Constructs a new RobotResults.- Parameters:
robot
- is the robot these results are forteamLeaderName
- is the team namerank
- is the rank of the robot in the battlescore
- is the total score for the robot in the battlesurvival
- is the survival score for the robot in the battlelastSurvivorBonus
- is the last survivor bonus for the robot in the battlebulletDamage
- is the bullet damage score for the robot in the battlebulletDamageBonus
- is the bullet damage bonus for the robot in the battleramDamage
- is the ramming damage for the robot in the battleramDamageBonus
- is the ramming damage bonus for the robot in the battlefirsts
- is the number of rounds this robot placed firstseconds
- is the number of rounds this robot placed secondthirds
- is the number of rounds this robot placed third
-
RobotResults
public RobotResults(RobotSpecification robot, BattleResults results)
Constructs new RobotResults based on aRobotSpecification
andBattleResults
.- Parameters:
robot
- the robot these results are forresults
- the battle results for the robot
-
-
Method Detail
-
getRobot
public RobotSpecification getRobot()
Returns the robot these results are meant for.- Returns:
- the robot these results are meant for.
-
convertResults
public static RobotResults[] convertResults(BattleResults[] results)
Converts an array ofBattleResults
into an array ofRobotResults
.- Parameters:
results
- an array of BattleResults to convert.- Returns:
- an array of RobotResults converted from BattleResults.
- Since:
- 1.6.2
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBattleResults
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBattleResults
-
-