Interface IRobotSnapshot


public interface IRobotSnapshot
Interface of a robot snapshot at a specific time in a battle.
Since:
1.6.2
Author:
Pavel Savara (original), Flemming N. Larsen (contributor)
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the color of the body.
    double
    Returns the body heading of the robot in radians.
    int
    Returns the contestant index, which is unique for each robot or team participating in a battle.
    Returns a snapshot of debug properties.
    double
    Returns the energy level of the robot.
    int
    Returns the color of the gun.
    double
    Returns the gun heading of the robot in radians.
    double
    Returns the gun heat of the robot.
    Returns the name of the robot.
    Returns a snapshot of the output print stream for this robot.
    int
    Returns the color of the radar.
    double
    Returns the radar heading of the robot in radians.
    int
    Returns the index of the robot, which is unique for the specific robot and constant during a battle.
    int
    Returns the color of the scan arc.
    Returns a snapshot of the current score for this robot.
    Returns the short name of the robot.
    Returns the robot state.
    int
    Returns the index of the team that this robot is a member of, which is unique for the specific team and constant during a battle.
    Returns the name of the team, which can be the name of a robot if the contestant is not a team, but a robot.
    double
    Returns the velocity of the robot.
    Returns the very short name of the robot.
    double
    Returns the X position of the robot.
    double
    Returns the Y position of the robot.
    boolean
    Checks if this robot is a Droid.
    boolean
    Checks if painting is enabled for this robot.
    boolean
    Checks if this robot is a IPaintRobot or is invoking getGraphics()
    boolean
    Checks if this robot is a BorderSentry.
    boolean
    Checks if RobocodeSG painting (the point (0,0) is in the upper left corner) is enabled for this robot.
  • Method Details

    • getName

      String getName()
      Returns the name of the robot.
      Returns:
      the name of the robot.
    • getShortName

      String getShortName()
      Returns the short name of the robot.
      Returns:
      the short name of the robot.
    • getVeryShortName

      String getVeryShortName()
      Returns the very short name of the robot.
      Returns:
      the very short name of the robot.
    • getTeamName

      String getTeamName()
      Returns the name of the team, which can be the name of a robot if the contestant is not a team, but a robot.
      Returns:
      the name of the team.
    • getRobotIndex

      int getRobotIndex()
      Returns the index of the robot, which is unique for the specific robot and constant during a battle.
      Returns:
      the robot index.
      Since:
      1.7.4
      See Also:
    • getTeamIndex

      int getTeamIndex()
      Returns the index of the team that this robot is a member of, which is unique for the specific team and constant during a battle.
      Returns:
      the team index or -1 if the robot is not a member of a team.
      Since:
      1.7.4
      See Also:
    • getContestantIndex

      int getContestantIndex()
      Returns the contestant index, which is unique for each robot or team participating in a battle. Note: If a team of robots is participating in a battle, this method will return the team index (see getTeamIndex()); otherwise the robot index (see getRobotIndex()) is used instead. This method is used for the battle results as scores are calculated for either a team of robots or individual robot.
      Returns:
      the contestant index of the robot or team.
      See Also:
    • getState

      RobotState getState()
      Returns the robot state.
      Returns:
      the robot state.
    • getEnergy

      double getEnergy()
      Returns the energy level of the robot.
      Returns:
      the energy level of the robot.
    • getVelocity

      double getVelocity()
      Returns the velocity of the robot.
      Returns:
      the velocity of the robot.
    • getBodyHeading

      double getBodyHeading()
      Returns the body heading of the robot in radians.
      Returns:
      the body heading of the robot in radians.
    • getGunHeading

      double getGunHeading()
      Returns the gun heading of the robot in radians.
      Returns:
      the gun heading of the robot in radians.
    • getRadarHeading

      double getRadarHeading()
      Returns the radar heading of the robot in radians.
      Returns:
      the radar heading of the robot in radians.
    • getGunHeat

      double getGunHeat()
      Returns the gun heat of the robot.
      Returns:
      the gun heat of the robot.
    • getX

      double getX()
      Returns the X position of the robot.
      Returns:
      the X position of the robot.
    • getY

      double getY()
      Returns the Y position of the robot.
      Returns:
      the Y position of the robot.
    • getBodyColor

      int getBodyColor()
      Returns the color of the body.
      Returns:
      an ARGB color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
      See Also:
    • getGunColor

      int getGunColor()
      Returns the color of the gun.
      Returns:
      an ARGB color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
      See Also:
    • getRadarColor

      int getRadarColor()
      Returns the color of the radar.
      Returns:
      an ARGB color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
      See Also:
    • getScanColor

      int getScanColor()
      Returns the color of the scan arc.
      Returns:
      an ARGB color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
      See Also:
    • isDroid

      boolean isDroid()
      Checks if this robot is a Droid.
      Returns:
      true if this robot is a Droid; false otherwise.
    • isSentryRobot

      boolean isSentryRobot()
      Checks if this robot is a BorderSentry.
      Returns:
      true if this robot is a BorderSentry; false otherwise.
      Since:
      1.9.0.0
    • isPaintRobot

      boolean isPaintRobot()
      Checks if this robot is a IPaintRobot or is invoking getGraphics()
      Returns:
      true if this robot is a painting; false otherwise.
    • isPaintEnabled

      boolean isPaintEnabled()
      Checks if painting is enabled for this robot.
      Returns:
      true if painting is enabled for this robot; false otherwise.
    • isSGPaintEnabled

      boolean isSGPaintEnabled()
      Checks if RobocodeSG painting (the point (0,0) is in the upper left corner) is enabled for this robot.
      Returns:
      true if RobocodeSG painting is enabled for this robot; false otherwise.
    • getDebugProperties

      IDebugProperty[] getDebugProperties()
      Returns a snapshot of debug properties.
      Returns:
      a snapshot of debug properties.
    • getOutputStreamSnapshot

      String getOutputStreamSnapshot()
      Returns a snapshot of the output print stream for this robot.
      Returns:
      a string containing the snapshot of the output print stream.
    • getScoreSnapshot

      IScoreSnapshot getScoreSnapshot()
      Returns a snapshot of the current score for this robot.
      Returns:
      a snapshot of the current score for this robot.