Skip to content

Commit

Permalink
fix(pairings): fix adding games to tournament matches
Browse files Browse the repository at this point in the history
  • Loading branch information
alanzhu0 committed Sep 23, 2024
1 parent 4ab0b6b commit d92898a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions othello/apps/tournaments/pairings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def swiss_pairing(players: Players, bye_player: TournamentPlayer) -> Pairings:

tournament_matches = set()
for game in tournament.games.all():
tournament_matches.add((game.black.id, game.white.id))
tournament_matches.add((game.white.id, game.black.id))
tournament_matches.add((game.game.black.id, game.game.white.id))
tournament_matches.add((game.game.white.id, game.game.black.id))

for i in range(0, len(players)):
if i + 1 >= len(players):
Expand Down

0 comments on commit d92898a

Please sign in to comment.