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

Refactor scoring to remove async methods / simplify #20011

Merged
merged 4 commits into from
Aug 29, 2022

Conversation

smoogipoo
Copy link
Contributor

@smoogipoo smoogipoo commented Aug 29, 2022

This applies the remaining cleanup mentioned in #20008

  • Removal of the async methods.
  • Simplification of maximum combo retrieval (now goes through MaximumStatistics).

Note that since ppy/osu-web#9223 hasn't been merged yet, scores will appear as:
image

/// <returns>The given <paramref name="scores"/> ordered by decreasing total score.</returns>
public async Task<ScoreInfo[]> OrderByTotalScoreAsync(ScoreInfo[] scores, CancellationToken cancellationToken = default)
public IEnumerable<ScoreInfo> OrderByTotalScore(IEnumerable<ScoreInfo> scores)
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        public IEnumerable<ScoreInfo> OrderByTotalScore(IEnumerable<ScoreInfo> scores) =>
            scores.OrderByDescending(s => GetTotalScore(s))
                  .ThenBy(s => s.OnlineID);

@smoogipoo
Copy link
Contributor Author

Fyi I tested this in combination with ppy/osu-web#9223 and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add enough metadata to SoloScoreInfo to allow full score calculation without DifficultyCalculator
2 participants