Public Member Functions | |
ManualBot () | |
Robot_Specs | createRobot (WorldAPI api, int skill_points, byte[] message) |
void | act (WorldAPI api, Robot_Status status, byte[][] received_radio) |
Static Public Attributes | |
static Scanner | scanner |
Private Member Functions | |
GridCell | dumpGrid (GridCell[][] neighborhood) |
Definition at line 7 of file ManualBot.java.
ManualBot.ManualBot | ( | ) |
void ManualBot.act | ( | WorldAPI | api, |
Robot_Status | status, | ||
byte | received_radio[][] | ||
) |
Each turn, this method is called to allow your robot to act.
api | a reference to a WorldAPI object you can use to interact with the simulator. |
status | a reference to a Robot_Status object containing information about your current health and energy level |
received_radio | the 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. |
Implements Robot.
Definition at line 89 of file ManualBot.java.
References Robot.Direction.DOWN, dumpGrid(), WorldAPI.getVisibleNeighborhood(), Robot.Direction.LEFT, WorldAPI.meleeAttack(), WorldAPI.move(), WorldAPI.rangedAttack(), Robot.Direction.RIGHT, Robot.Direction.UP, Robot.GridCell.x_coord, and Robot.GridCell.y_coord.
Robot_Specs ManualBot.createRobot | ( | WorldAPI | api, |
int | skill_points, | ||
byte[] | message | ||
) |
Entry point for your robot on its creation
api | a reference to a WorldAPI object you can use to interact with the simulator (currently unused) |
skill_points | the number of skill points your robot is allowed to have. |
message | a 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. |
Implements Robot.
Definition at line 17 of file ManualBot.java.
Definition at line 42 of file ManualBot.java.
Referenced by act().
|
static |
Definition at line 9 of file ManualBot.java.
Referenced by ManualBot().