Class ScannedBotEvent

  • All Implemented Interfaces:
    IEvent

    public final class ScannedBotEvent
    extends BotEvent
    Event occurring when a bot has scanned another bot.
    • Constructor Summary

      Constructors 
      Constructor Description
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getDirection()
      Returns the direction in degrees of the scanned bot.
      double getEnergy()
      Returns the energy level of the scanned bot.
      int getScannedBotId()
      Returns the id of the bot that was scanned.
      int getScannedByBotId()
      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 Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • 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.