A retro style homage to 80s dungeon crawlers hand crafted in C++.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 
raycaster/tests/mazes.cpp

25 lines
549 B

#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "matrix.hpp"
#include "rand.hpp"
#include "constants.hpp"
#include "maze.hpp"
using std::string;
using matrix::Matrix;
TEST_CASE("hunt-and-kill", "[maze-gen]") {
auto map = matrix::make(21, 21);
std::vector<Room> rooms;
std::vector<Point> dead_ends;
maze::hunt_and_kill(map, rooms, dead_ends);
matrix::dump("MAZE?", map);
for(auto& room : rooms) {
fmt::println("room: {},{}; {},{}",
room.x, room.y, room.width, room.height);
}
}