Skip to content

Commit

Permalink
fix(mapper): properly regenerate invalid map
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Dujava <[email protected]>
  • Loading branch information
jdujava committed Sep 26, 2024
1 parent f8ae39d commit 63ff837
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion generals/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ def generate_map(
if Mapper.validate_map(map):
return map
else:
return Mapper.generate_map()
return Mapper.generate_map(
grid_size=grid_size,
mountain_density=mountain_density,
city_density=city_density,
general_positions=general_positions,
seed=seed,
)

@staticmethod
def validate_map(map: str) -> bool:
Expand Down

0 comments on commit 63ff837

Please sign in to comment.