Now the rooms are better at having good doors.

This commit is contained in:
Zed A. Shaw 2026-03-15 03:20:29 -04:00
parent 908f5bfb3e
commit 8e2a691337
8 changed files with 69 additions and 70 deletions

View file

@ -38,7 +38,7 @@ TEST_CASE("camera control", "[map]") {
TEST_CASE("map placement test", "[map-fail]") {
GameDB::init();
for(int i = 0; i < 20; i++) {
for(int i = 0; i < 10; i++) {
auto& level = GameDB::create_level();
for(size_t rnum = 0; rnum < level.map->room_count(); rnum++) {

View file

@ -7,7 +7,7 @@
#include "algos/maze.hpp"
#include "algos/stats.hpp"
#define DUMP 0
#define DUMP 1
using std::string;
using matrix::Matrix;

View file

@ -10,6 +10,7 @@
#include <thread>
#include "algos/rand.hpp"
#include "game/systems.hpp"
#include "constants.hpp"
using namespace fmt;
using namespace nlohmann;
@ -63,7 +64,9 @@ TEST_CASE("dijkstra algo test", "[pathing-old]") {
pathing.$input = test["input"];
REQUIRE(pathing.INVARIANT());
pathing.compute_paths(walls);
int longest = pathing.compute_paths(walls);
REQUIRE(longest > 0);
REQUIRE(longest < WALL_PATH_LIMIT);
REQUIRE(pathing.INVARIANT());