Skip to content
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

Fix ranking #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix ranking #29

wants to merge 2 commits into from

Conversation

Arnaud-D
Copy link
Contributor

Before this PR, players with the same score are ranked equally, and the following player would then have this rank plus one.

This PR implements ranking as seen usually in tournaments: players with the same score are ranked equally, and following players are then ranked using their position in the sorted list of scores.

Anyway, the code is a better description of what is happening. ^^

QA

  • create a game,
  • have three players (at least) playing,
  • make the first two have the same score and the third one a lower score,
  • observe that the ranking is : 1st, 1st, 3rd (instead of 1st, 1st, 2nd before this PR).

@AmauryCarrade AmauryCarrade added the enhancement New feature or request label Jan 23, 2022
Co-authored-by: Amaury Carrade <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants