forked from bjanczuk/A-Maze-Ing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcell.h
37 lines (30 loc) · 843 Bytes
/
cell.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
// Jessica Hardey, Bart Janczuk, Josefa Osorio, Aidan Lewis
// cell.h
#ifndef CELL_H
#define CELL_H
#include <iostream>
#include <set>
enum WALL {LEFT, UP, RIGHT, DOWN};
using namespace std;
class cell {
public:
cell();
~cell();
void setCoords(int, int);
pair<int, int> getCoords() const;
void switchWall(int, bool);
bool getWall(int) const;
void setVisited(bool);
bool isVisited();
void setKruskalIndex(int);
int getKruskalIndex();
void setEllerIndex(int);
int getEllerIndex();
private:
pair<int, int> coords;
bool wall[4]; // 0 = left, 1 = up, 2 = right, 3 = down
bool visited;
int kruskalIndex; // index of the cell in a vector of sets used for Kruskal's algorithm
int ellerIndex; // index of the cell in a vector of sets used for Eller's algorithm
};
#endif