Package dev.robocode.tankroyale.botapi
Class BotResults
- java.lang.Object
-
- dev.robocode.tankroyale.botapi.BotResults
-
public final class BotResults extends java.lang.Object
Represents individual bot results.
-
-
Constructor Summary
Constructors Constructor Description BotResults(int rank, double survival, double lastSurvivorBonus, double bulletDamage, double bulletKillBonus, double ramDamage, double ramKillBonus, double totalScore, int firstPlaces, int secondPlaces, int thirdPlaces)
Initializes a new instance of the BotInfo class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBulletDamage()
Returns the bullet damage score.double
getBulletKillBonus()
Returns the bullet kill-bonus.int
getFirstPlaces()
Returns the number of 1st places for the bot.double
getLastSurvivorBonus()
Returns the last survivor score.double
getRamDamage()
Returns the ram damage score.double
getRamKillBonus()
Returns the ram kill-bonus.int
getRank()
Returns the rank/placement of the bot, where 1 means 1st place, 4 means 4th place etc.int
getSecondPlaces()
Returns the number of 2nd places for the bot.double
getSurvival()
Returns the accumulated survival score.int
getThirdPlaces()
Returns the number of 3rd places for the bot.double
getTotalScore()
Returns the total score is the sum of all scores and determines the ranking.
-
-
-
Constructor Detail
-
BotResults
public BotResults(int rank, double survival, double lastSurvivorBonus, double bulletDamage, double bulletKillBonus, double ramDamage, double ramKillBonus, double totalScore, int firstPlaces, int secondPlaces, int thirdPlaces)
Initializes a new instance of the BotInfo class.- Parameters:
rank
- is the rank/placement of the bot.survival
- is the survival score.lastSurvivorBonus
- is the last survivor score.bulletDamage
- is the bullet damage score.bulletKillBonus
- is the bullet kill bonus.ramDamage
- is the ram damage score.ramKillBonus
- is the ram kill bonus.totalScore
- is the total score.firstPlaces
- is the number of 1st places.secondPlaces
- is the number of 2nd places.thirdPlaces
- is the number of 3rd places.
-
-
Method Detail
-
getRank
public int getRank()
Returns the rank/placement of the bot, where 1 means 1st place, 4 means 4th place etc.- Returns:
- The rank of the bot for this battle.
-
getSurvival
public double getSurvival()
Returns the accumulated survival score. Every bot still alive score 50 points every time another bot is defeated.- Returns:
- The survival score.
-
getLastSurvivorBonus
public double getLastSurvivorBonus()
Returns the last survivor score. The last bot alive scores 10 points or each bot that has been defeated.- Returns:
- The last survivor score.
-
getBulletDamage
public double getBulletDamage()
Returns the bullet damage score. A bot score 1 point for each point of damage they do to other bots.- Returns:
- The bullet damage score.
-
getBulletKillBonus
public double getBulletKillBonus()
Returns the bullet kill-bonus. When a bot kills another bot, it scores an additional 20% points of the total damage it did to that bot.- Returns:
- The bullet kill-bonus.
-
getRamDamage
public double getRamDamage()
Returns the ram damage score. Bots score 2 points for each point of damage inflicted by ramming an enemy bot. Ramming is the act deliberately driving forward (not backward) and hitting another bot.- Returns:
- The ram damage score.
-
getRamKillBonus
public double getRamKillBonus()
Returns the ram kill-bonus. When a bot kills another bot due to ramming, it scores an additional 30% of the total ramming damage it did to that bot.- Returns:
- The ram kill-bonus.
-
getTotalScore
public double getTotalScore()
Returns the total score is the sum of all scores and determines the ranking.- Returns:
- The total score.
-
getFirstPlaces
public int getFirstPlaces()
Returns the number of 1st places for the bot.- Returns:
- The number of 1st places.
-
getSecondPlaces
public int getSecondPlaces()
Returns the number of 2nd places for the bot.- Returns:
- The number of 2nd places.
-
getThirdPlaces
public int getThirdPlaces()
Returns the number of 3rd places for the bot.- Returns:
- The number of 3rd places.
-
-