aboutsummaryrefslogtreecommitdiff
path: root/src/maze.hpp
blob: 650e60a957bd0a56eb9bf00ef59e5ae92a743cee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include "engine/matrix.hpp"
#include "engine/vector2.hpp"
#include "random_generator.hpp"
#include <memory>
#include <string>

/**
 * Turns a matrix into a maze.
 *
 * @param matrix A matrix
 * @param start_pos The start position in the matrix
 * @param space_element A matrix element used to indicate a space in a maze
 * @param random_gen A pseudo-random number generator
 */
template <typename Element>
void matrix_to_maze(Matrix<Element> *matrix, std::shared_ptr<Vector2> start_pos,
					Element space_element,
					std::shared_ptr<RandomNumberGenerator> random_gen);

#include "maze.tpp"