diff options
author | HampusM <hampus@hampusmat.com> | 2022-01-09 21:47:23 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-01-09 21:47:23 +0100 |
commit | 8ceb79db1d0687bba005cef4a77bb889bf7ec3c3 (patch) | |
tree | b7c13359f652506d60c8556ea386ae8d50bfc5bc /src/maze.hpp | |
parent | 097aa95c1f0cb159e7d9d0a3edf9284c421ee298 (diff) |
refactor: rewrite to c++
Diffstat (limited to 'src/maze.hpp')
-rw-r--r-- | src/maze.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/maze.hpp b/src/maze.hpp new file mode 100644 index 0000000..0ff1d06 --- /dev/null +++ b/src/maze.hpp @@ -0,0 +1,24 @@ +#ifndef MAZE_HPP +#define MAZE_HPP + +#include "matrix.hpp" +#include "vector2.hpp" +#include <memory> +#include <random> +#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::mt19937 random_gen); + +#include "maze.tpp" + +#endif |