Add missing termination condition
This commit is contained in:
parent
b0ac580677
commit
e21d4d230c
|
@ -165,6 +165,8 @@ class Generator:
|
|||
y, x = pos // width, pos % width
|
||||
if self.room_fits(level, y, x, room, door_y, door_x, dy, dx):
|
||||
self.place_room(level, y, x, room, door_y, door_x)
|
||||
rooms_built += 1
|
||||
tries += 1
|
||||
|
||||
# post-processing
|
||||
self.place_walls(level)
|
||||
|
|
Loading…
Reference in New Issue