Class 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
    • 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 for
        teamLeaderName - is the team name
        rank - is the rank of the robot in the battle
        score - is the total score for the robot in the battle
        survival - is the survival score for the robot in the battle
        lastSurvivorBonus - is the last survivor bonus for the robot in the battle
        bulletDamage - is the bullet damage score for the robot in the battle
        bulletDamageBonus - is the bullet damage bonus for the robot in the battle
        ramDamage - is the ramming damage for the robot in the battle
        ramDamageBonus - is the ramming damage bonus for the robot in the battle
        firsts - is the number of rounds this robot placed first
        seconds - is the number of rounds this robot placed second
        thirds - is the number of rounds this robot placed third
    • 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 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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class BattleResults