### robocode.control.snapshot

# Interface IRobotSnapshot

`public interface IRobotSnapshot`

Interface of a robot snapshot.

Authors:
  Pavel Savara (original)
  Flemming N. Larsen (contributor)

Since:
  1.6.2

  ## Method Summary

  `int`

  `getBodyColor()`
    Returns the color of the body.

  `double`

  `getBodyHeading()`
    Returns the body heading in radians.

  `int`

  `getContestantIndex()`
    Returns the index of the contestant that will not be changed during a battle.

  `IDebugProperty[]`

  `getDebugProperties()`
    Returns a list of all debug properties.

  `double`

  `getEnergy()`
    Returns the energy level.

  `int`

  `getGunColor()`
    Returns the color of the gun.

  `double`

  `getGunHeading()`
    Returns the gun heading in radians.

  `double`

  `getGunHeat()`
    Returns the gun heat.

  `String`

  `getName()`
    Returns the name of the robot.

  `String`

  `getOutputStreamSnapshot()`
    Returns a snapshot of the output print stream for this robot.

  `int`

  `getRadarColor()`
    Returns the color of the radar.

  `double`

  `getRadarHeading()`
    Returns the radar heading in radians.

  `int`

  `getScanColor()`
    Returns the color of the scan arc.

  `IScoreSnapshot`

  `getScoreSnapshot()`
    Returns snapshot current score.

  `String`

  `getShortName()`
    Returns the very short name of the robot.

  `RobotState`

  `getState()`
    Returns the robot status.

  `String`

  `getTeamName()`
    Returns the name of the team, or name of the robot if the contestant is not a team.

  `double`

  `getVelocity()`
    Returns the velocity.

  `String`

  `getVeryShortName()`
    Returns the very short name of the robot.

  `double`

  `getX()`
    Returns the x coordinate of the robot.

  `double`

  `getY()`
    Returns the y coordinate of the robot.

  `boolean`

  `isDroid()`
    Returns a flag specifying if this robot is a `Droid`.

  `boolean`

  `isPaintEnabled()`
    Returns a flag specifying if robot's (onPaint) painting is enabled for the robot.

  `boolean`

  `isPaintRobot()`
    Returns a flag specifying if this robot is an `IPaintRobot` or is asking for getGraphics().

  `boolean`

  `isSGPaintEnabled()`
    Returns a flag specifying if RobocodeSG painting is enabled for the robot.

## Method Details

### getBodyColor

    public int getBodyColor()

> Returns the color of the body.
> Returns:
>   a RGBA color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
> See Also:
>   `Color.getRGB()`

### getBodyHeading

    public double getBodyHeading()

> Returns the body heading in radians.
> Returns:
>   the body heading in radians.

### getContestantIndex

    public int getContestantIndex()

> Returns the index of the contestant that will not be changed during a battle.
> Returns:
>   the index of the contestant that will not be changed during a battle.

### getDebugProperties

    public IDebugProperty[] getDebugProperties()

> Returns a list of all debug properties.
> Returns:
>   a list of all debug properties.

### getEnergy

    public double getEnergy()

> Returns the energy level.
> Returns:
>   the energy level.

### getGunColor

    public int getGunColor()

> Returns the color of the gun.
> Returns:
>   a RGBA color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
> See Also:
>   `Color.getRGB()`

### getGunHeading

    public double getGunHeading()

> Returns the gun heading in radians.
> Returns:
>   the gun heading in radians.

### getGunHeat

    public double getGunHeat()

> Returns the gun heat.
> Returns:
>   the gun heat.

### getName

    public String getName()

> Returns the name of the robot.
> Returns:
>   the name of the robot.

### getOutputStreamSnapshot

    public String getOutputStreamSnapshot()

> Returns a snapshot of the output print stream for this robot.
> Returns:
>   a string containing the snapshot of the output print stream.

### getRadarColor

    public int getRadarColor()

> Returns the color of the radar.
> Returns:
>   a RGBA color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
> See Also:
>   `Color.getRGB()`

### getRadarHeading

    public double getRadarHeading()

> Returns the radar heading in radians.
> Returns:
>   the radar heading in radians.

### getScanColor

    public int getScanColor()

> Returns the color of the scan arc.
> Returns:
>   a RGBA color value. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue)
> See Also:
>   `Color.getRGB()`

### getScoreSnapshot

    public IScoreSnapshot getScoreSnapshot()

> Returns snapshot current score.
> Returns:
>   snapshot current score.

### getShortName

    public String getShortName()

> Returns the very short name of the robot.
> Returns:
>   the very short name of the robot.

### getState

    public RobotState getState()

> Returns the robot status.
> Returns:
>   the robot status.

### getTeamName

    public String getTeamName()

> Returns the name of the team, or name of the robot if the contestant is not a team.
> Returns:
>   the name of the team, or name of the robot if the contestant is not a team.

### getVelocity

    public double getVelocity()

> Returns the velocity.
> Returns:
>   the velocity.

### getVeryShortName

    public String getVeryShortName()

> Returns the very short name of the robot.
> Returns:
>   the very short name of the robot.

### getX

    public double getX()

> Returns the x coordinate of the robot.
> Returns:
>   the x coordinate of the robot.

### getY

    public double getY()

> Returns the y coordinate of the robot.
> Returns:
>   the y coordinate of the robot.

### isDroid

    public boolean isDroid()

> Returns a flag specifying if this robot is a `Droid`.
> Returns:
>   `true` if this robot is a Droid; `false` otherwise.

### isPaintEnabled

    public boolean isPaintEnabled()

> Returns a flag specifying if robot's (onPaint) painting is enabled for the robot.
> Returns:
>   `true` if the paintings for this robot is enabled; `false` otherwise.

### isPaintRobot

    public boolean isPaintRobot()

> Returns a flag specifying if this robot is an `IPaintRobot` or is asking for getGraphics().
> Returns:
>   `true` if this robot is a an IPaintRobot or is asking for getGraphics(); `false` otherwise.

### isSGPaintEnabled

    public boolean isSGPaintEnabled()

> Returns a flag specifying if RobocodeSG painting is enabled for the robot.
> Returns:
>   `true` if RobocodeSG painting is enabled for this robot; `false` otherwise.