battlecode.common
Interface GameObject

All Known Subinterfaces:
Robot

public interface GameObject

A GameObject instance represents an object in the game world.

A GameObject should have a final, globally unique integer ID. These fields can be accessed by the accessors in GameObject. Any other, mutable information about the GameObject must be sensed, e.g. by myRobotController.senseLocationOf(someGameObject).

The only valid GameObjects are those returned by sensing objects on the map. If a contestant writes a class that implements GameObject, that GameObject will be invalid, and will result in a GameActionException of type GameActionExceptionType.INVALID_OBJECT if it is used.

See Also:
Team, RobotController

Method Summary
 int getID()
          Gives the globally unique integer ID of this GameObject
 RobotLevel getRobotLevel()
          Gives the level at which this object appears.
 Team getTeam()
          Gives this GameObject's team
 

Method Detail

getID

int getID()
Gives the globally unique integer ID of this GameObject

Returns:
this GameObject's ID

getTeam

Team getTeam()
Gives this GameObject's team


getRobotLevel

RobotLevel getRobotLevel()
Gives the level at which this object appears.