aboutsummaryrefslogtreecommitdiff
path: root/app/utilities.py
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-07-13 18:20:04 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2025-07-13 18:20:04 +0200
commitd5d64f2b1047f864811d23f19f109a6513c22a2a (patch)
treeccea4ca1a4e58e65f74819daa67b8997d583ec71 /app/utilities.py
parent673361f4475f0fde43fefa57735d766b4cb22c30 (diff)
Working version with several bugs
Diffstat (limited to 'app/utilities.py')
-rw-r--r--app/utilities.py4
1 files changed, 2 insertions, 2 deletions
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 = []