Skip to content

Commit

Permalink
generator: fix bot_count when generating multiple games
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiq0 authored Dec 3, 2024
1 parent fa9eae6 commit bdd9b66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web/proboj/matches/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def generate_matches(game: Game, number: int = 1) -> list[MatchPlan]:
matches = []
for i in range(number):
config: Configuration = random.choice(configurations)
bot_count = len(latest_versions)
if config.max_bots and bot_count > config.max_bots:
bot_count = config.max_bots
bots: list[BotVersion] = random.sample(latest_versions, k=bot_count)
Expand Down

0 comments on commit bdd9b66

Please sign in to comment.