Class HitBotEvent
- Object
-
- BotEvent
-
- HitBotEvent
-
-
Constructor Summary
Constructors Constructor Description HitBotEvent(int turnNumber, int victimId, double energy, double x, double y, boolean isRammed)Initializes a new instance of the BotHitBotEvent class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetEnergy()Returns the remaining energy level of the victim bot.intgetVictimId()Returns the id of the other bot that your bot has collided with.doublegetX()Returns the X coordinate of victim bot.doublegetY()Returns the Y coordinate of victim bot.booleanisRammed()Checks if the other bot got rammed by your bot.-
Methods inherited from class BotEvent
getTurnNumber, isCritical
-
-
-
-
Constructor Detail
-
HitBotEvent
public HitBotEvent(int turnNumber, int victimId, double energy, double x, double y, boolean isRammed)Initializes a new instance of the BotHitBotEvent class.- Parameters:
turnNumber- is the turn number where the bot hit another bot.victimId- is the id of the other bot that your bot has collided with.energy- is the remaining energy level of the victim bot.x- is the X coordinate of victim bot.y- is the Y coordinate of victim bot.isRammed- is the flag specifying, if the victim bot got rammed.
-
-
Method Detail
-
getVictimId
public int getVictimId()
Returns the id of the other bot that your bot has collided with.- Returns:
- The id of the other bot that your bot has collided with.
-
getEnergy
public double getEnergy()
Returns the remaining energy level of the victim bot.- Returns:
- The remaining energy level of the victim bot.
-
getX
public double getX()
Returns the X coordinate of victim bot.- Returns:
- The X coordinate of victim bot.
-
getY
public double getY()
Returns the Y coordinate of victim bot.- Returns:
- The Y coordinate of victim bot.
-
isRammed
public boolean isRammed()
Checks if the other bot got rammed by your bot.- Returns:
trueif the other bot got rammed;falseotherwise.
-
-