Changing the way the tile matrix is declared so that every column is represented by a different list
This commit is contained in:
parent
7cfe55f42c
commit
d40a61554e
@ -58,7 +58,7 @@ class Generator:
|
||||
def run(self):
|
||||
width, height = self.params["width"], self.params["height"]
|
||||
walkers = [Walker(width//2, height//2)]
|
||||
grid = [[Tile.WALL] * width] * height
|
||||
grid = [[Tile.WALL for _ in range(width)] for _ in range(height)]
|
||||
count = 0
|
||||
while count < self.params["fill"] * width*height:
|
||||
# because we can't add or remove walkers while looping over the pop
|
||||
|
Loading…
Reference in New Issue
Block a user