-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmazecell.h
48 lines (39 loc) · 920 Bytes
/
mazecell.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
#ifndef MAZECELL_H
#define MAZECELL_H
class Cell
{
public:
enum eWALL
{
WALL_NONE = 0, // 00000000
WALL_NORTH = 1, // 00000001
WALL_EAST = 2, // 00000010
WALL_SOUTH = 4, // 00000100
WALL_WEST = 8, // 00001000
WALL_ALL = 15 // 00001111
};
Cell(int rowIdx, int colIdx);
~Cell();
void setVisited(bool bVisited);
bool isVisited();
void setWall(char cWall);
char getWall();
void removeWall(char direction);
bool isNorthWall();
bool isEastWall();
bool isSouthWall();
bool isWestWall();
void setRowIdx(int rowIndex);
int getRowIdx();
void setColIdx(int colIndex);
int getColIdx();
void setParentCell(Cell* cell);
Cell* getParentCell();
private:
bool m_bVisited;
char m_cWall;
int m_ptRowIdx;
int m_ptColIdx;
Cell* m_pParentCell;
};
#endif // MAZECELL_H