From b0ac580677a5f46ec1b61412f3025d9a5d8ab283 Mon Sep 17 00:00:00 2001 From: Charles Peyrat Date: Fri, 8 Jan 2021 07:03:49 +0100 Subject: [PATCH] Fix place_walls, that placed floors instead ... --- squirrelbattle/mapgeneration/broguelike.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/squirrelbattle/mapgeneration/broguelike.py b/squirrelbattle/mapgeneration/broguelike.py index 40529e5..dff9a7c 100644 --- a/squirrelbattle/mapgeneration/broguelike.py +++ b/squirrelbattle/mapgeneration/broguelike.py @@ -60,9 +60,9 @@ class Generator: for y in range(h): for x in range(w): if level[y][x] == Tile.FLOOR: - for dy, dx in Map.neighbourhood(level, y, x): - if level[y+dy][x+dx] == Tile.EMPTY: - level[y+dy][x+dx] = Tile.FLOOR + for ny, nx in Map.neighbourhood(level, y, x): + if level[ny][nx] == Tile.EMPTY: + level[ny][nx] = Tile.WALL def corr_meta_info(self): if random() < self.params["corridor_chance"]: