### robocode.control

# Class RobotResults

- `java.lang.Object`
- - `robocode.BattleResults`
  - - `robocode.control.RobotResults`

Implemented Interfaces:
  Comparable, Serializable

`public class RobotResults`
`extends BattleResults`

Contains the battle results for an individual robot, which is given as input parameter with the `RobocodeListener#battleComplete()` event handler.

Authors:
  Mathew A. Nelson (original)
  Flemming N. Larsen (contributor)

See Also:
  `RobocodeListener`, Serialized Form

  ## Field Summary

  ### Fields inherited from class robocode.BattleResults

  `bulletDamage`, `bulletDamageBonus`, `firsts`, `lastSurvivorBonus`, `ramDamage`, `ramDamageBonus`, `rank`, `score`, `seconds`, `serialVersionUID`, `survival`, `teamLeaderName`, `thirds`

  ## Constructor Summary

  `RobotResults(RobotSpecification robot, 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 new RobotResults.

  `RobotResults(RobotSpecification robot, BattleResults results)`
    Constructs new RobotResults based on a `RobotSpecification` and `BattleResults`.

  ## Method Summary

  `static RobotResults[]`

  `convertResults(BattleResults[] results)`
    Converts an array of `BattleResults` into an array of `RobotResults`.

  `RobotSpecification`

  `getRobot()`
    Returns the robot these results are meant for.

  ### Methods inherited from class robocode.BattleResults

  `compareTo`, `getBulletDamage`, `getBulletDamageBonus`, `getFirsts`, `getLastSurvivorBonus`, `getRamDamage`, `getRamDamageBonus`, `getRank`, `getScore`, `getSeconds`, `getSurvival`, `getTeamLeaderName`, `getThirds`

## Constructor Details

### RobotResults

    public RobotResults(RobotSpecification robot,
                        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 new RobotResults.
> Parameters:
>   `robot` - the robot these results are for
>   `teamLeaderName` - team name
>   `rank` - the rank of the robot in the battle
>   `score` - the total score for the robot in the battle
>   `survival` - the survival score for the robot in the battle
>   `lastSurvivorBonus` - the last survivor bonus for the robot in the battle
>   `bulletDamage` - the bullet damage score for the robot in the battle
>   `bulletDamageBonus` - the bullet damage bonus for the robot in the battle
>   `ramDamage` - the ramming damage for the robot in the battle
>   `ramDamageBonus` - the ramming damage bonus for the robot in the battle
>   `firsts` - the number of rounds this robot placed first
>   `seconds` - the number of rounds this robot placed second
>   `thirds` - the number of rounds this robot placed third

### RobotResults

    public RobotResults(RobotSpecification robot,
                        BattleResults results)

> Constructs new RobotResults based on a `RobotSpecification` and `BattleResults`.
> Parameters:
>   `robot` - the robot these results are for
>   `results` - the battle results for the robot

## Method Details

### convertResults

    public static RobotResults[] convertResults(BattleResults[] results)

> Converts an array of `BattleResults` into an array of `RobotResults`.
> Parameters:
>   `results` - an array of BattleResults to convert.
> Returns:
>   an array of RobotResults converted from BattleResults.
> Since:
>   1.6.2

### getRobot

    public RobotSpecification getRobot()

> Returns the robot these results are meant for.
> Returns:
>   the robot these results are meant for.