From df2c1a4b55232605fac936b4938fae3b2d724830 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 8 Jan 2021 17:10:42 +0100 Subject: [PATCH] Add ladder on the start position --- squirrelbattle/mapgeneration/broguelike.py | 1 + 1 file changed, 1 insertion(+) diff --git a/squirrelbattle/mapgeneration/broguelike.py b/squirrelbattle/mapgeneration/broguelike.py index ca830b8..38d462f 100644 --- a/squirrelbattle/mapgeneration/broguelike.py +++ b/squirrelbattle/mapgeneration/broguelike.py @@ -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