Getting to full cover, and minor fix to bug that allowed corridors to create loops in a room, resulting in implacability

This commit is contained in:
Charles Peyrat
2021-01-10 21:48:12 +01:00
parent 96bbc5088f
commit e639ad6255
2 changed files with 5 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class Generator:
if 0 <= ny < rh and 0 <= nx < rw \
and room[ny][nx] != Tile.EMPTY:
return False
for i in range(length):
for i in range(length+1):
if room[y + i * dy][x + i * dx] != Tile.EMPTY:
return False
for i in range(length):