From d5d64f2b1047f864811d23f19f109a6513c22a2a Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Sun, 13 Jul 2025 18:20:04 +0200 Subject: Working version with several bugs --- app/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/utilities.py') diff --git a/app/utilities.py b/app/utilities.py index 00dc14a..c84e1bf 100644 --- a/app/utilities.py +++ b/app/utilities.py @@ -89,7 +89,7 @@ def get_team_games( ) -> list[DisplayGame]: games = [] for court, (_, players) in zip(courts, teams.items()): - players = sample(players, app.config["PLAYER_PER_COURT"]) + players = sample(players, app.config["PLAYERS_PER_COURT"]) players.sort(key=lambda x: x.level, reverse=True) dp = [DisplayPlayer(p) for p in players] games.append( @@ -101,7 +101,7 @@ def get_team_games( def get_shuffle_games( courts: list[Court], players: Sequence[Player], total_levels: int ) -> list[DisplayGame]: - required_player_count = len(courts) * app.config["PLAYER_PER_COURT"] + required_player_count = len(courts) * app.config["PLAYERS_PER_COURT"] selected_players = select_players(players, required_player_count) court_players = group_by_four(selected_players, total_levels) games = [] -- cgit v1.3.1