robocode.control
Class ShipResults
java.lang.Object
robocode.BattleResults
robocode.NavalBattleResults
robocode.control.ShipResults
- All Implemented Interfaces:
- Serializable, Comparable<BattleResults>, IResults
public class ShipResults
- extends NavalBattleResults
- implements IResults
Handles the results for a specific Ship
- Author:
- Thales B.V. / Thomas Hakkers
- See Also:
- Serialized Form
Fields inherited from class robocode.BattleResults |
bulletDamage, bulletDamageBonus, firsts, lastSurvivorBonus, ramDamage, ramDamageBonus, rank, score, seconds, survival, teamLeaderName, thirds |
Constructor Summary |
ShipResults(RobotSpecification ship,
NavalBattleResults results)
Constructs new ShipResults based on a RobotSpecification and NavalBattleResults . |
ShipResults(RobotSpecification ship,
String teamLeaderName,
int rank,
double score,
double survival,
double lastSurvivorBonus,
double bulletDamage,
double bulletDamageBonus,
double ramDamage,
double ramDamageBonus,
double mineDamage,
double mineDamageBonus,
int firsts,
int seconds,
int thirds)
Constructs a new ShipResults. |
Methods inherited from class robocode.BattleResults |
compareTo, getBulletDamage, getBulletDamageBonus, getFirsts, getLastSurvivorBonus, getRamDamage, getRamDamageBonus, getRank, getScore, getSeconds, getSurvival, getTeamLeaderName, getThirds |
ShipResults
public ShipResults(RobotSpecification ship,
String teamLeaderName,
int rank,
double score,
double survival,
double lastSurvivorBonus,
double bulletDamage,
double bulletDamageBonus,
double ramDamage,
double ramDamageBonus,
double mineDamage,
double mineDamageBonus,
int firsts,
int seconds,
int thirds)
- Constructs a new ShipResults.
- Parameters:
ship
- is the ship these results are forteamLeaderName
- is the team namerank
- is the rank of the ship in the battlescore
- is the total score for the ship in the battlesurvival
- is the survival score for the ship in the battlelastSurvivorBonus
- is the last survivor bonus for the ship in the battlebulletDamage
- is the bullet damage score for the ship in the battlebulletDamageBonus
- is the bullet damage bonus for the ship in the battleramDamage
- is the ramming damage for the ship in the battleramDamageBonus
- is the ramming damage bonus for the ship in the battlemineDamage
- is the damage the mines of this ship have done in this battlemineDamageBonus
- is the mine bonus for the shipfirsts
- is the number of rounds this ship placed firstseconds
- is the number of rounds this ship placed secondthirds
- is the number of rounds this ship placed third
ShipResults
public ShipResults(RobotSpecification ship,
NavalBattleResults results)
- Constructs new ShipResults based on a
RobotSpecification
and NavalBattleResults
.
- Parameters:
ship
- the ship these results are forresults
- the battle results for the ship
getRobot
public RobotSpecification getRobot()
- Returns the ship these results are meant for.
Note that ships use RobotSpecifications, just like robots.
- Specified by:
getRobot
in interface IResults
- Returns:
- the ship these results are meant for.
convertResults
public static ShipResults[] convertResults(NavalBattleResults[] results)
- Converts an array of
NavalBattleResults
into an array of ShipResults
.
- Parameters:
results
- an array of NavalBattleResults to convert.
- Returns:
- an array of ShipResults converted from NavalBattleResults.
- Since:
- 1.9.1.2
hashCode
public int hashCode()
- Specified by:
hashCode
in interface IResults
- Overrides:
hashCode
in class BattleResults
equals
public boolean equals(Object obj)
- Specified by:
equals
in interface IResults
- Overrides:
equals
in class BattleResults
Copyright © 2015 Robocode. All Rights Reserved.