#include <DefenderBot.hpp>
Definition at line 13 of file DefenderBot.hpp.
void DefenderBot::act |
( |
WorldAPI & |
api, |
|
|
Robot_Status |
status, |
|
|
vector< vector< uint8_t >> |
received_radio |
|
) |
| |
|
inline |
virtual void Robot::act |
( |
WorldAPI & |
api, |
|
|
Robot_Status |
status, |
|
|
std::vector< std::vector< std::uint8_t > > |
received_radio |
|
) |
| |
|
pure virtualinherited |
Each turn, this method is called to allow your robot to act.
- Parameters
-
api | a reference to a WorldAPI object you can use to interact with the simulator. |
status | 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. |
Referenced by RoboSim::executeSingleTimeStep().
Robot_Specs DefenderBot::createRobot |
( |
WorldAPI * |
api, |
|
|
int |
skill_points, |
|
|
vector< uint8_t > |
message |
|
) |
| |
|
inline |
virtual Robot_Specs Robot::createRobot |
( |
WorldAPI * |
api, |
|
|
int |
skill_points, |
|
|
std::vector< std::uint8_t > |
message |
|
) |
| |
|
pure virtualinherited |
Entry point for your robot on its creation
- Parameters
-
api | a pointer to a WorldAPI object you can use to interact with the simulator, if it's not NULL (currently unused and always NULL) |
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. |
- Returns
- You are to return a Robot_Specs object containing the allocation of skill points you have chosen for yourself.
Referenced by RoboSim::RoboAPIImplementor::finalizeBuilding(), and RoboSim::RoboSim().
The documentation for this class was generated from the following file: