Robot Interface Reference
Inheritance diagram for Robot:

Classes

class  AttackNotice
 
enum  AttackResult
 
enum  AttackType
 
enum  BuildStatus
 
enum  Direction
 
class  GridCell
 
enum  GridObject
 
class  Robot_Specs
 
class  Robot_Status
 
class  RobotUtility
 

Public Member Functions

Robot_Specs createRobot (WorldAPI api, int skill_points, byte[] message)
 
void act (WorldAPI api, Robot_Status status, byte[][] received_radio)
 

Detailed Description

Definition at line 11 of file Robot.java.

Member Function Documentation

void Robot.act ( WorldAPI  api,
Robot_Status  status,
byte  received_radio[][] 
)

Each turn, this method is called to allow your robot to act.

Parameters
apia reference to a WorldAPI object you can use to interact with the simulator.
statusa reference to a Robot_Status object containing information about your current health and energy level
received_radiothe radio signals you have received this round. Each message is exactly 64 bytes long. You may be able to receive additional radio signals by calling getMessages() with a nonzero power if you are being jammed.

Implemented in ManualBot, DemoBot, and DefenderBot.

Robot_Specs Robot.createRobot ( WorldAPI  api,
int  skill_points,
byte[]  message 
)

Entry point for your robot on its creation

Parameters
apia reference to a WorldAPI object you can use to interact with the simulator (currently unused)
skill_pointsthe number of skill points your robot is allowed to have.
messagea 64-byte message from the robot who created you. If you were created by the simulator, the first two bytes of the message will contain your ID, which is unique among the IDs of all your team's robots created by the world. Otherwise, the format of the message is unspecified: it's up to you to define it.
Returns
You are to return a Robot_Specs object containing the allocation of skill points you have chosen for yourself.

Implemented in ManualBot, DefenderBot, and DemoBot.

Referenced by RoboSim.RoboAPIImplementor.finalizeBuilding(), and RoboSim.RoboSim().

Here is the caller graph for this function:


The documentation for this interface was generated from the following file: