diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-15 20:27:51 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-02-15 20:27:51 +0100 |
commit | 5dae8f8d10d506abc3c75a1f66c1dfe620c84fc1 (patch) | |
tree | 2bfb6efef0535a35bab1da811a5f69cb5203dff9 /src/app/maze.hpp | |
parent | 9147551cd21d565f9503e3ebbcd2121e284d88d5 (diff) |
refactor: improve project design
Diffstat (limited to 'src/app/maze.hpp')
-rw-r--r-- | src/app/maze.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/app/maze.hpp b/src/app/maze.hpp new file mode 100644 index 0000000..2dd05a5 --- /dev/null +++ b/src/app/maze.hpp @@ -0,0 +1,23 @@ +#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, + const std::shared_ptr<RandomNumberGenerator>& random_gen); + +#include "maze.tpp" |