From 8ceb79db1d0687bba005cef4a77bb889bf7ec3c3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 9 Jan 2022 21:47:23 +0100 Subject: refactor: rewrite to c++ --- src/maze.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/maze.hpp (limited to 'src/maze.hpp') 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 +#include +#include + +/** + * 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 +void matrix_to_maze(Matrix *matrix, std::shared_ptr start_pos, + Element space_element, std::mt19937 random_gen); + +#include "maze.tpp" + +#endif -- cgit v1.2.3-18-g5258