Played around with a circular map real quick.
This commit is contained in:
parent
9dcc2036aa
commit
c0d668fb0b
5 changed files with 18 additions and 7 deletions
4
maze.cpp
4
maze.cpp
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue