Add walls even to map borders

This commit is contained in:
Charles Peyrat 2020-12-18 17:05:50 +01:00
parent fb926f8c84
commit 5fbb918132
1 changed files with 8 additions and 0 deletions

View File

@ -111,5 +111,13 @@ class Generator:
result.tiles[y][x] = Tile.FLOOR result.tiles[y][x] = Tile.FLOOR
elif c > 0: elif c > 0:
result.tiles[y][x] = Tile.WALL result.tiles[y][x] = Tile.WALL
for x in range(width):
for y in [0, height-1]:
if grid[y][x] = Tile.FLOOR:
grid[y][x] = Tile.WALL
for y in range(height):
for y in [0, width-1]:
if grid[y][x] = Tile.FLOOR:
grid[y][x] = Tile.WALL
return result return result