Played around with a circular map real quick.

This commit is contained in:
Zed A. Shaw 2025-05-24 10:58:28 -04:00
parent 9dcc2036aa
commit c0d668fb0b
5 changed files with 18 additions and 7 deletions

View file

@ -116,15 +116,13 @@ namespace maze {
}
}
void Builder::hunt_and_kill() {
void Builder::hunt_and_kill(Point on) {
for(auto& room : $rooms) {
for(matrix::box it{$walls, room.x, room.y, room.width}; it.next();) {
$walls[it.y][it.x] = 0;
}
}
Point on{1,1};
while(!complete($walls)) {
auto n = neighbors($walls, on);
if(n.size() == 0) {