public interface Robot
| Modifier and Type | Interface and Description |
|---|---|
static class |
Robot.AttackNotice
Class representing information about a particular attack or
attempted attack you suffered the previous round.
|
static class |
Robot.AttackResult
Represents result of attack: missed, hit, destroyed target
|
static class |
Robot.AttackType
Attack type: melee, ranged, or capsule
|
static class |
Robot.BuildStatus
Represents what a robot is currently building
|
static class |
Robot.Direction
Represents orientation in simulator's world.
|
static class |
Robot.GridCell
Represents cell in grid of simulator's world.
|
static class |
Robot.GridObject
Represents object located in particular GridCell.
|
static class |
Robot.Robot_Specs
Represents skill point allocation of Robot.
|
static class |
Robot.Robot_Status
Represents current status of Robot, passed to Robot.act() method
to let robot know its current health, charge, and capsules.
|
static class |
Robot.RobotUtility
RobotUtility class
Provides utilities for students to use in Robot implementations. |
| Modifier and Type | Method and Description |
|---|---|
void |
act(WorldAPI api,
Robot.Robot_Status status,
byte[][] received_radio)
Each turn, this method is called to allow your robot to act.
|
Robot.Robot_Specs |
createRobot(WorldAPI api,
int skill_points,
byte[] message)
Entry point for your robot on its creation
|
Robot.Robot_Specs createRobot(WorldAPI api, int skill_points, byte[] message)
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.void act(WorldAPI api, Robot.Robot_Status status, byte[][] received_radio)
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 levelreceived_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.