-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMaze.h
More file actions
31 lines (24 loc) · 674 Bytes
/
Copy pathMaze.h
File metadata and controls
31 lines (24 loc) · 674 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
#ifndef MAZE_H
#define MAZE_H
#include <vector>
#include <string>
#include <utility>
class Maze {
public:
// Construct a maze with given dimensions and optional seed
Maze(int rows = 21, int cols = 41, unsigned seed = 0);
std::vector<std::string> grid;
// Accessors
std::pair<int, int> getStart() const { return start; }
std::pair<int, int> getGoal() const { return goal; }
int getRows() const { return rows; }
int getCols() const { return cols; }
private:
int rows;
int cols;
unsigned seed;
std::pair<int, int> start;
std::pair<int, int> goal;
void generateSolvableMaze(int wallDensity);
};
#endif // MAZE_H