Skip to content

Incorrect ranking for tied scores #6

@ebeneliason

Description

@ebeneliason

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions