-
Notifications
You must be signed in to change notification settings - Fork 0
/
grid.h
39 lines (25 loc) · 795 Bytes
/
grid.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
#ifndef GRID_H
#define GRID_H
#include <set>
// Grid class, stores the information of the creeps or
// tower on this grid
class Grid {
public:
// enum the directions
enum Direction {NONE, LEFT, RIGHT, UP, DOWN,
TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT};
Grid();
~Grid();
// Set the direction which the creeps on this grid should head for
void setDirection(Direction dir);
// Get the direction
Direction getDirection() const;
// Set whether this grid is walkable by creeps
void setWalkable(bool walkable);
// Determine whether this grid is walkable
bool isWalkable() const;
private:
Direction _direction;
bool _is_walkable;
};
#endif