Add ladder on the start position

This commit is contained in:
Yohann D'ANELLO 2021-01-08 17:10:42 +01:00
parent 8e7029e34d
commit df2c1a4b55
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ class Generator:
sy, sx = randint(0, height - 1), randint(0, width - 1)
while level[sy][sx] != Tile.FLOOR:
sy, sx = randint(0, height - 1), randint(0, width - 1)
level[sy][sx] = Tile.LADDER
# now we loop until we've tried enough, or we've added enough rooms
tries, rooms_built = 0, 0