C++20 Maze generation and solution finder library. Header Only.
- Recursive Backtracking
- Randomized Kruskal's
- Randomized Prim's
- Aldous Broder
- Recursive Division
CMake is the supported build generator, it generates the maze-lib
target.
#include <iostream>
#include <utility>
#include <maze/display.hpp>
#include <maze/generate_prims.hpp>
#include <maze/longest_path.hpp>
#include <maze/maze.hpp>
int main()
{
constexpr auto width = 41;
constexpr auto height = 21;
using namespace maze;
auto const maze = generate_prims<width, height>();
auto const solution = longest_path(maze);
std::cout << std::pair{maze, solution};
}