-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaze.h
More file actions
33 lines (25 loc) · 704 Bytes
/
maze.h
File metadata and controls
33 lines (25 loc) · 704 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
32
33
#include <QPainter>
//--------------------------------------------------------------------------------------------------
enum directions { NONE, NOR = 1, EAS = 2, SOU = 4, WES = 8 };
class mazeGenerator
{
public:
mazeGenerator(int _xs,int _ys = 0);
~mazeGenerator();
void carve();
int getDirection();
bool testDirection( int );
int getDirection2();
bool testDir( int d );
void draw(QPainter *painter);
int CELL_SIZE;
char** world;
char* _world;
int _szx,_szy, _ptX, _ptY;
char* _pts;
int _sx, _sy, _ex, _ey, _lastDir;
void solveIt( );
void findTheWay();
void updatePosition( int );
int invert( int );
};