Add ladder on the start position
This commit is contained in:
parent
8e7029e34d
commit
df2c1a4b55
|
@ -184,6 +184,7 @@ class Generator:
|
||||||
sy, sx = randint(0, height - 1), randint(0, width - 1)
|
sy, sx = randint(0, height - 1), randint(0, width - 1)
|
||||||
while level[sy][sx] != Tile.FLOOR:
|
while level[sy][sx] != Tile.FLOOR:
|
||||||
sy, sx = randint(0, height - 1), randint(0, width - 1)
|
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
|
# now we loop until we've tried enough, or we've added enough rooms
|
||||||
tries, rooms_built = 0, 0
|
tries, rooms_built = 0, 0
|
||||||
|
|
Loading…
Reference in New Issue