Fix walls

This commit is contained in:
Yohann D'ANELLO 2021-01-08 17:10:30 +01:00
parent 1ab63434f6
commit 8e7029e34d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -71,8 +71,8 @@ class Generator:
h, w = len(level), len(level[0])
for y in range(h):
for x in range(w):
if level[y][x] == Tile.FLOOR:
for ny, nx in Map.neighbourhood(level, y, x):
if not level[y][x].is_wall():
for ny, nx in Map.neighbourhood(level, y, x, large=True):
if level[ny][nx] == Tile.EMPTY:
level[ny][nx] = Tile.WALL