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

Incorrect ranking for tied scores #6

Open
ebeneliason opened this issue Sep 10, 2024 · 0 comments
Open

Incorrect ranking for tied scores #6

ebeneliason opened this issue Sep 10, 2024 · 0 comments

Comments

@ebeneliason
Copy link

The _update_ranks function appears to assign each score a rank corresponding to its index in the (sorted) list of scores. This fails to account for the possibility of tied scores, in which case I believe the ranks should match. I couldn't find positive confirmation of this in the Playdate Scoreboard API reference, but I think this circumstance is one reason that the scores are presented as records with a rank property, rather than as an array.

For example, if the score values for the second and third place players are equal, I'd expect both to have a rank of 2. (There would be no rank 3 in the list, as ranking would proceed with 4 for the 4th place player.)

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

No branches or pull requests

1 participant