Skip to content

Match structure #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 3, 2023
Merged

Conversation

ImogenBits
Copy link
Collaborator

This just makes the match have a single battle per matchup instead of some number of rounds. The iterated battle wrapper itself then runs some number of rounds internally.

@Benezivas
Copy link
Collaborator

Thank you for the PR, could you look into the test that fails in the CI?

======================================================================
ERROR: test_calculate_points_zero_rounds (tests.test_match.Matchtests.test_calculate_points_zero_rounds)
All teams get 0 points if no rounds have been fought.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/algobattle/algobattle/tests/test_match.py", line 48, in test_calculate_points_zero_rounds
    self.assertEqual(match.calculate_points(), {self.team0.name: 0, self.team1.name: 0})
                     ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/algobattle/algobattle/algobattle/match.py", line 95, in calculate_points
    home_res = self.results[home_matchup]
               ~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: <exception str() failed>

@ImogenBits
Copy link
Collaborator Author

fixed

@Benezivas
Copy link
Collaborator

Thank you for the PR, this can be accepted as-is.

@Benezivas Benezivas merged commit 555bdf5 into Algorithmic-Battle:4.0.0-rc Apr 3, 2023
@ImogenBits ImogenBits deleted the match_structure branch April 5, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants