diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-16 16:20:13 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-16 16:20:13 +0200 |
| commit | b581661c993095c43ad19540999ab21957d0e013 (patch) | |
| tree | 3a8259e7d4b224142752975d5f95b40313a71378 /controller.py | |
| parent | 0a4dac8168d726707a46b9aa60a257ecaba6a620 (diff) | |
Added guests funtionality
Diffstat (limited to 'controller.py')
| -rw-r--r-- | controller.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/controller.py b/controller.py index 751586e..c153001 100644 --- a/controller.py +++ b/controller.py @@ -60,9 +60,12 @@ class RoundGenerator: return used_courts, unused_courts def _select_players(self, count: int) -> dict: - active_players = self.players.get_active_players() + active_players = self.players.get_potential_players() identifiers = [*active_players] - play_count = [self.history[player_id] for player_id in active_players] + play_count = [ + self.history[player_id] if player_id < self.players.guest_id_start else 10 + for player_id in active_players + ] ids = sample_list(identifiers, play_count, count) return {player_id: active_players[player_id] for player_id in ids} |
