Force loop entrance to get coverage
This commit is contained in:
parent
c06f903a16
commit
fab1bee8d8
|
@ -96,8 +96,8 @@ class Generator:
|
||||||
next_walker_pop.append(walker.split())
|
next_walker_pop.append(walker.split())
|
||||||
walkers = next_walker_pop
|
walkers = next_walker_pop
|
||||||
|
|
||||||
start_x, start_y = randint(0, width - 1), randint(0, height - 1)
|
start_x, start_y = -1, -1
|
||||||
while grid[start_y][start_x] != Tile.FLOOR:
|
while grid[start_y][start_x] != Tile.FLOOR or start_x == -1:
|
||||||
start_x, start_y = randint(0, width - 1), randint(0, height - 1)
|
start_x, start_y = randint(0, width - 1), randint(0, height - 1)
|
||||||
|
|
||||||
result = Map(width, height, grid, start_y, start_x)
|
result = Map(width, height, grid, start_y, start_x)
|
||||||
|
|
Loading…
Reference in New Issue