forked from SharifAIChallenge/AIC17-Client-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMap.h
56 lines (38 loc) · 1.02 KB
/
Map.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef MAP_H
#define MAP_H
#include "Types.h"
#include "Cell.h"
#include <map>
#include <vector>
class Map
{
public:
Map(Size size, int myId);
virtual ~Map();
int getWidth();
int getHeight();
std::vector<Cell*> getMyCells();
std::vector<Cell*> getOppCells();
std::vector<Cell*> getTeleportCells();
std::vector<Cell*> getSlipperCells();
std::vector<Cell*> getTrashCells();
std::vector<Cell*> getFoodCells();
Entity *getEntity(int id);
EntityType getEntityType(int id);
void addEntity(Entity *entity);
void moveEntity(int id, Move move);
void moveEntity(int id, int row, int col, bool wing, bool sick);
void delEntity(int id);
private:
Size size;
int myId;
// Cell*** table;
std::map<int, Entity *> allEntities;
std::vector<Cell *> myCells;
std::vector<Cell *> oppCells;
std::vector<Cell *> teleportCells;
std::vector<Cell *> slipperCells;
std::vector<Cell *> trashCells;
std::vector<Cell *> foodCells;
};
#endif /* MAP_H */