-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.hpp
More file actions
47 lines (41 loc) · 945 Bytes
/
Copy pathmap.hpp
File metadata and controls
47 lines (41 loc) · 945 Bytes
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
#ifndef MAP_HPP
#define MAP_HPP
#include <vector>
#include <string>
#include "tower.hpp"
#include "entity.hpp"
#include "path.hpp"
class Map
{
public:
Map();
void setSize(int x, int y);
const int* getSize();
bool addTower(Tower* t);
bool addEntity(Entity* e);
bool addPath(Path* p);
bool checkTowerPos(int x, int y);
Tower* getTower(int i);
Entity* getEntity(int i);
Path* getPath(int i);
int getNumTowers();
int getNumEntities();
int getNumPaths();
Entity* getClosestEntity(int x, int y);
bool setStartPoint(int x, int y);
Path* getStartPoint();
bool setGoalPoint(int x, int y);
Path* getGoalPoint();
Path* bestAdjacentPath(Object* o);
void moveEntity(Entity* e);
std::string print();
~Map();
private:
std::vector<Tower*> towers;
std::vector<Entity*> entities;
std::vector<Path*> paths;
int size[2];
Path startPoint;
Path goalPoint;
};
#endif // MAP_HPP