Class HitBotEvent
java.lang.Object
dev.robocode.tankroyale.botapi.events.BotEvent
dev.robocode.tankroyale.botapi.events.HitBotEvent
-
Constructor Summary
ConstructorDescriptionHitBotEvent
(int turnNumber, int victimId, double energy, double x, double y, boolean isRammed) Initializes a new instance of the BotHitBotEvent class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the remaining energy level of the victim bot.int
Returns the id of the other bot that your bot has collided with.double
getX()
Returns the X coordinate of victim bot.double
getY()
Returns the Y coordinate of victim bot.boolean
isRammed()
Checks if the other bot got rammed by your bot.Methods inherited from class dev.robocode.tankroyale.botapi.events.BotEvent
getTurnNumber, isCritical
-
Constructor Details
-
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 Details
-
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:
true
if the other bot got rammed;false
otherwise.
-