WorldAPI.hpp
Go to the documentation of this file.
1 #include "robot_api.hpp"
2 
3 using namespace robot_api;
4 
12 class WorldAPI
13 {
14 public:
15  /*/**********************************************
16  * Movement Methods
17  ***********************************************/
18 
26  virtual AttackResult meleeAttack(int power, GridCell& adjacent_cell)=0;
27 
35  virtual AttackResult rangedAttack(int power, GridCell& nonadjacent_cell)=0;
36 
42  virtual AttackResult capsuleAttack(int power_of_capsule, GridCell& cell)=0;
43 
48  virtual void defend(int power)=0;
49 
50  /*/**********************************************
51  * Movement Methods
52  ***********************************************/
53 
59  virtual void move(int steps, Direction way)=0;
60 
66  virtual void pick_up_capsule(GridCell& adjacent_cell)=0;
67 
73  virtual void drop_capsule(GridCell& adjacent_cell, int power_of_capsule)=0;
74 
75  /*/**********************************************
76  * Construction Methods
77  ***********************************************/
78 
84  virtual BuildStatus getBuildStatus()=0;
85 
89  virtual GridCell* getBuildTarget()=0;
90 
93  virtual int getInvestedBuildPower()=0;
94 
111  virtual void setBuildTarget(BuildStatus status, GridCell* location)=0;
112 
131  virtual void setBuildTarget(BuildStatus status, GridCell* location, vector<uint8_t> message)=0;
132 
137  virtual void build(int power)=0;
138 
143  virtual void repair(int power)=0;
144 
150  virtual void charge(int power, GridCell& ally)=0;
151 
152  /*/**********************************************
153  * Radio Methods
154  ***********************************************/
155 
164  /*byte[][] getMessages(int power);*/ //disabled
165 
171  virtual void sendMessage(vector<uint8_t> message, int power)=0;
172 
179  virtual vector<vector<GridCell> > getVisibleNeighborhood()=0;
180 
189  virtual vector<vector<GridCell> > getWorld(int power)=0;
190 
199  virtual void scanEnemy(Robot_Specs& enemySpecs, Robot_Status& enemyStatus, GridCell toScan)=0;
200 
207  /*virtual void jamRadio(int power)=0;*/ //disabled
208 };