robocode.robotinterfaces
Interface ITransformablePeer

All Known Subinterfaces:
IRobotSnapshot, IShipSnapshot, ITransformable

public interface ITransformablePeer


Method Summary
 double getBattleFieldHeight()
          Get the height of the battlefield.
 double getBattleFieldWidth()
          Get the width of the battlefield.
 double getBodyHeading()
          Returns the direction that the robot's body is facing, in radians.
 double getX()
          Returns the X position of the robot. (0,0) is at the bottom left of the battlefield.
 double getY()
          Returns the Y position of the robot. (0,0) is at the bottom left of the battlefield.
 

Method Detail

getX

double getX()
Returns the X position of the robot. (0,0) is at the bottom left of the battlefield.

Returns:
the X position of the robot.
See Also:
getY()

getY

double getY()
Returns the Y position of the robot. (0,0) is at the bottom left of the battlefield.

Returns:
the Y position of the robot.
See Also:
getX()

getBodyHeading

double getBodyHeading()
Returns the direction that the robot's body is facing, in radians. The value returned will be between 0 and 2 * PI (is excluded).

Note that the heading in Robocode is like a compass, where 0 means North, PI / 2 means East, PI means South, and 3 * PI / 2 means West.

Returns:
the direction that the robot's body is facing, in radians.

getBattleFieldWidth

double getBattleFieldWidth()
Get the width of the battlefield.

Returns:
The width of the battlefield.

getBattleFieldHeight

double getBattleFieldHeight()
Get the height of the battlefield.

Returns:
The height of the battlefield.


Copyright © 2015 Robocode. All Rights Reserved.