-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMaze.h
47 lines (33 loc) · 823 Bytes
/
Maze.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
//
// Created by brett on 06/02/18.
//
#ifndef MAZESOLVER_V2_MAZE_H
#define MAZESOLVER_V2_MAZE_H
#include <string>
#include "StackNode.h"
#include "Stack.h"
using namespace std;
class Maze {
private:
char** emptyMaze;
char** maze;
int rows = 0;
int cols = 0;
std::string file;
std::string dir = "mazes/";
Point end;
enum mazeDetails{ Free = ' ', Used = '#', Dead = 'D' };
enum moves { East = 0, South = 1, West = 2, North = 3 };
public:
explicit Maze(const string &fileName);
void saveMazeToFile();
void setMazeSize();
void buildMazeArray();
void Move(moves move, Stack *stack, Point *pos);
void solve();
bool checkMove(Point here, moves move);
void printMaze();
void printBothMazes();
void clean();
};
#endif //MAZESOLVER_V2_MAZE_H