Class ScannedBotEvent
java.lang.Object
dev.robocode.tankroyale.botapi.events.BotEvent
dev.robocode.tankroyale.botapi.events.ScannedBotEvent
-
Constructor Summary
ConstructorDescriptionScannedBotEvent
(int turnNumber, int scannedByBotId, int scannedBotId, double energy, double x, double y, double direction, double speed) Initializes a new instance of the ScannedBotEvent class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the direction in degrees of the scanned bot.double
Returns the energy level of the scanned bot.int
Returns the id of the bot that was scanned.int
Returns the id of the bot did the scanning.double
getSpeed()
Returns the Speed measured in units per turn of the scanned bot.double
getX()
Returns the X coordinate of the scanned bot.double
getY()
Returns the Y coordinate of the scanned bot.Methods inherited from class dev.robocode.tankroyale.botapi.events.BotEvent
getTurnNumber, isCritical
-
Constructor Details
-
ScannedBotEvent
public ScannedBotEvent(int turnNumber, int scannedByBotId, int scannedBotId, double energy, double x, double y, double direction, double speed) Initializes a new instance of the ScannedBotEvent class.- Parameters:
turnNumber
- is the turn number when the bot was scanned.scannedByBotId
- is the id of the bot did the scanning.scannedBotId
- is the id of the bot that was scanned.energy
- is the energy level of the scanned bot.x
- is the X coordinate of the scanned bot.y
- is the Y coordinate of the scanned bot.direction
- is the direction in degrees of the scanned bot.speed
- is the speed measured in units per turn of the scanned bot.
-
-
Method Details
-
getScannedByBotId
public int getScannedByBotId()Returns the id of the bot did the scanning.- Returns:
- The id of the bot did the scanning.
-
getScannedBotId
public int getScannedBotId()Returns the id of the bot that was scanned.- Returns:
- The id of the bot that was scanned.
-
getEnergy
public double getEnergy()Returns the energy level of the scanned bot.- Returns:
- The energy level of the scanned bot.
-
getX
public double getX()Returns the X coordinate of the scanned bot.- Returns:
- The X coordinate of the scanned bot.
-
getY
public double getY()Returns the Y coordinate of the scanned bot.- Returns:
- The Y coordinate of the scanned bot.
-
getDirection
public double getDirection()Returns the direction in degrees of the scanned bot.- Returns:
- The direction in degrees of the scanned bot.
-
getSpeed
public double getSpeed()Returns the Speed measured in units per turn of the scanned bot.- Returns:
- The Speed measured in units per turn of the scanned bot.
-