1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 21:34:29 +08:00

Simplify LINQ usage to appease inspectcode

This commit is contained in:
Dean Herbert
2025-08-07 23:06:52 +09:00
Unverified
parent c23856c54b
commit 8d11f4df0c
@@ -334,7 +334,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
{
var score = TestResources.CreateTestScoreInfo(beatmap);
score.User = API.LocalUser.Value;
score.Rank = rank ?? Enum.GetValues<ScoreRank>().OrderBy(_ => RNG.Next()).First();
score.Rank = rank ?? Enum.GetValues<ScoreRank>().MinBy(_ => RNG.Next());
score.TotalScore = (long)(((double)score.Rank + 1) / (Enum.GetValues<ScoreRank>().Length + 1) * 1000000);
score.Date = DateTimeOffset.Now;
applyToScore?.Invoke(score);