-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMazeGenerator.h
37 lines (34 loc) · 922 Bytes
/
MazeGenerator.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
//
// Created by Marius on 20.02.2018.
//
#ifndef MAZESOLVER_MAZEGENERATOR_H
#define MAZESOLVER_MAZEGENERATOR_H
#include "Cell.h"
#include <array>
#include <stack>
class MazeGenerator{
private:
Cell** matrix;
Cell* currentCell;
Cell* start;
Cell* end;
int MatrixSize;
stack<Cell*> CellStack;
SDL_Renderer* renderer;
int scale;
public:
MazeGenerator(int matrixSize, int windowWidth, int windowHeight, SDL_Renderer* renderer);
void GenerateMaze();
void DrawMaze(SDL_Color color);
void renderMazeToScreen();
void removeWalls(Cell* current, Cell* next);
void pickRandomStartEnd();
Cell* getCellNeighbour();
Cell** getMatrix();
int getSize();
Cell* getStart();
Cell* getEnd();
int getScale();
void destroy();
};
#endif //MAZESOLVER_MAZEGENERATOR_H