-
Notifications
You must be signed in to change notification settings - Fork 0
/
Maze.h
46 lines (37 loc) · 1.23 KB
/
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
#ifndef MAZE_H
#define MAZE_H
#include<vector>
#include<iostream>
class Maze
{
public:
Maze(int, int, int, double, double);
int LENGTH;
int WIDTH;
int HEIGHT;
static const uint8_t FLOOR = 1; // 00 00 00 01;
static const uint8_t EAST = 2; // 00 00 00 10;
static const uint8_t NORTH = 4; // 00 00 01 00;
static const uint8_t WEST = 8; // 00 00 10 00;
static const uint8_t SOUTH = 16; // 00 01 00 00;
static const uint8_t CEIL = 32; // 00 10 00 00;
std::vector<int> cell_data;
int &operator()(int row, int col, int floor){
return cell_data.at(col + LENGTH*row + LENGTH*WIDTH*floor);
}
void build();
void print();
virtual ~Maze();
protected:
private:
// Variables
double EAST_WALL_THRESHOLD;
double SOUTH_WALL_THRESHOLD;
std::vector< std::tuple<int, int, int, int, int, int> > passages;
typedef std::tuple<int, int, int> pos;
// Methods
int get_val(int, int, int);
void set_val(int, int, int, int);
void calc_cell_values();
};
#endif // MAZE_H