From 243d15c12300a60812fc838173344ff5327f409f Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 4 Oct 2024 17:09:28 -0400 Subject: [PATCH] Just don't prevent start points being in walls. --- map.cpp | 6 +----- status.txt | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/map.cpp b/map.cpp index 26703d9..69821c5 100644 --- a/map.cpp +++ b/map.cpp @@ -180,11 +180,7 @@ bool Map::neighbors(Point &out, bool greater) { int zero_i = -1; int cur = $paths[out.y][out.x]; - if(cur == 1000) { - // BUG: sometimes the generation clips a door and we - // start in a wall - return false; - } + // BUG: sometimes cur is in a wall so finding neighbors fails for(int i = 0; i < 4; ++i) { Point dir = dirs[i]; diff --git a/status.txt b/status.txt index 19a527c..01ad54e 100644 --- a/status.txt +++ b/status.txt @@ -2,4 +2,5 @@ TODO: * Figure out how to render color fonts from FTUI. * Dynamically determine the font vs. screensize to get an exact FTXUI screen size. +* Write a test that generates a ton of maps then confirms there's a path from one room to every other room? * Lua integration?