2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-06-28 12:04:39 +08:00
|
|
|
|
using System;
|
2022-01-28 20:59:29 +08:00
|
|
|
|
using System.Collections.Generic;
|
2021-06-14 14:06:33 +08:00
|
|
|
|
using System.Linq;
|
2021-06-14 13:35:24 +08:00
|
|
|
|
using NUnit.Framework;
|
2019-12-20 13:29:54 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
2021-06-14 14:06:33 +08:00
|
|
|
|
using osu.Framework.Audio;
|
2022-01-03 16:02:15 +08:00
|
|
|
|
using osu.Framework.Extensions;
|
2019-03-25 00:02:36 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
2021-06-14 14:06:33 +08:00
|
|
|
|
using osu.Framework.Platform;
|
|
|
|
|
using osu.Framework.Testing;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
2021-11-04 17:02:44 +08:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2018-12-14 18:51:27 +08:00
|
|
|
|
using osu.Game.Online.Leaderboards;
|
2019-12-20 13:29:54 +08:00
|
|
|
|
using osu.Game.Overlays;
|
2021-06-14 14:06:33 +08:00
|
|
|
|
using osu.Game.Rulesets;
|
2020-08-31 18:54:22 +08:00
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2022-01-10 14:06:41 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu;
|
2019-09-19 14:23:37 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Mods;
|
2018-11-28 15:12:57 +08:00
|
|
|
|
using osu.Game.Scoring;
|
2019-03-25 00:02:36 +08:00
|
|
|
|
using osu.Game.Screens.Select.Leaderboards;
|
2021-06-14 14:06:33 +08:00
|
|
|
|
using osu.Game.Tests.Resources;
|
2019-03-25 00:02:36 +08:00
|
|
|
|
using osu.Game.Users;
|
|
|
|
|
using osuTK;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
|
namespace osu.Game.Tests.Visual.SongSelect
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-09-19 12:19:48 +08:00
|
|
|
|
public class TestSceneBeatmapLeaderboard : OsuTestScene
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
private readonly FailableLeaderboard leaderboard;
|
|
|
|
|
|
2022-04-19 02:04:22 +08:00
|
|
|
|
[Cached(typeof(IDialogOverlay))]
|
2019-12-20 13:57:14 +08:00
|
|
|
|
private readonly DialogOverlay dialogOverlay;
|
2019-12-20 13:29:54 +08:00
|
|
|
|
|
2021-06-14 14:06:33 +08:00
|
|
|
|
private ScoreManager scoreManager;
|
|
|
|
|
|
|
|
|
|
private RulesetStore rulesetStore;
|
|
|
|
|
private BeatmapManager beatmapManager;
|
|
|
|
|
|
|
|
|
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
|
|
|
|
{
|
|
|
|
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
|
|
|
|
|
2022-02-16 16:13:51 +08:00
|
|
|
|
dependencies.Cache(rulesetStore = new RealmRulesetStore(Realm));
|
2022-01-25 11:58:15 +08:00
|
|
|
|
dependencies.Cache(beatmapManager = new BeatmapManager(LocalStorage, Realm, rulesetStore, null, dependencies.Get<AudioManager>(), Resources, dependencies.Get<GameHost>(), Beatmap.Default));
|
|
|
|
|
dependencies.Cache(scoreManager = new ScoreManager(rulesetStore, () => beatmapManager, LocalStorage, Realm, Scheduler));
|
|
|
|
|
Dependencies.Cache(Realm);
|
2021-06-14 14:06:33 +08:00
|
|
|
|
|
|
|
|
|
return dependencies;
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-19 12:19:48 +08:00
|
|
|
|
public TestSceneBeatmapLeaderboard()
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2021-06-14 14:06:33 +08:00
|
|
|
|
AddRange(new Drawable[]
|
2019-12-20 13:29:54 +08:00
|
|
|
|
{
|
2021-06-14 14:06:33 +08:00
|
|
|
|
dialogOverlay = new DialogOverlay
|
|
|
|
|
{
|
|
|
|
|
Depth = -1
|
|
|
|
|
},
|
|
|
|
|
leaderboard = new FailableLeaderboard
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Size = new Vector2(550f, 450f),
|
|
|
|
|
Scope = BeatmapLeaderboardScope.Global,
|
|
|
|
|
}
|
2019-12-20 13:29:54 +08:00
|
|
|
|
});
|
2021-06-14 14:06:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestLocalScoresDisplay()
|
|
|
|
|
{
|
|
|
|
|
BeatmapInfo beatmapInfo = null;
|
|
|
|
|
|
|
|
|
|
AddStep(@"Set scope", () => leaderboard.Scope = BeatmapLeaderboardScope.Local);
|
2019-12-20 13:29:54 +08:00
|
|
|
|
|
2021-06-14 14:06:33 +08:00
|
|
|
|
AddStep(@"Set beatmap", () =>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2022-01-03 16:02:15 +08:00
|
|
|
|
beatmapManager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
2021-06-14 14:06:33 +08:00
|
|
|
|
beatmapInfo = beatmapManager.GetAllUsableBeatmapSets().First().Beatmaps.First();
|
|
|
|
|
|
2021-10-02 23:55:29 +08:00
|
|
|
|
leaderboard.BeatmapInfo = beatmapInfo;
|
2020-01-04 03:34:26 +08:00
|
|
|
|
});
|
2021-06-14 14:06:33 +08:00
|
|
|
|
|
|
|
|
|
clearScores();
|
|
|
|
|
checkCount(0);
|
|
|
|
|
|
|
|
|
|
loadMoreScores(() => beatmapInfo);
|
|
|
|
|
checkCount(10);
|
|
|
|
|
|
|
|
|
|
loadMoreScores(() => beatmapInfo);
|
|
|
|
|
checkCount(20);
|
|
|
|
|
|
|
|
|
|
clearScores();
|
|
|
|
|
checkCount(0);
|
2021-06-14 13:35:24 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2021-06-14 13:35:24 +08:00
|
|
|
|
[Test]
|
2021-06-14 14:06:33 +08:00
|
|
|
|
public void TestGlobalScoresDisplay()
|
2021-06-14 13:35:24 +08:00
|
|
|
|
{
|
2021-06-14 14:06:33 +08:00
|
|
|
|
AddStep(@"Set scope", () => leaderboard.Scope = BeatmapLeaderboardScope.Global);
|
2022-01-30 15:16:00 +08:00
|
|
|
|
AddStep(@"New Scores", () => leaderboard.SetScores(generateSampleScores(new BeatmapInfo())));
|
2021-06-14 13:35:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestPersonalBest()
|
|
|
|
|
{
|
2019-09-19 14:23:37 +08:00
|
|
|
|
AddStep(@"Show personal best", showPersonalBest);
|
2021-06-14 13:35:24 +08:00
|
|
|
|
AddStep("null personal best position", showPersonalBestWithNullPosition);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestPlaceholderStates()
|
|
|
|
|
{
|
2022-01-30 15:16:33 +08:00
|
|
|
|
AddStep("ensure no scores displayed", () => leaderboard.SetScores(null));
|
|
|
|
|
|
2022-01-31 00:12:03 +08:00
|
|
|
|
AddStep(@"Network failure", () => leaderboard.SetErrorState(LeaderboardState.NetworkFailure));
|
|
|
|
|
AddStep(@"No supporter", () => leaderboard.SetErrorState(LeaderboardState.NotSupporter));
|
|
|
|
|
AddStep(@"Not logged in", () => leaderboard.SetErrorState(LeaderboardState.NotLoggedIn));
|
2022-03-02 13:10:59 +08:00
|
|
|
|
AddStep(@"Ruleset unavailable", () => leaderboard.SetErrorState(LeaderboardState.RulesetUnavailable));
|
|
|
|
|
AddStep(@"Beatmap unavailable", () => leaderboard.SetErrorState(LeaderboardState.BeatmapUnavailable));
|
2022-01-31 00:12:03 +08:00
|
|
|
|
AddStep(@"None selected", () => leaderboard.SetErrorState(LeaderboardState.NoneSelected));
|
2021-06-14 13:35:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-02-20 13:51:25 +08:00
|
|
|
|
private void showPersonalBestWithNullPosition()
|
|
|
|
|
{
|
2022-01-30 15:16:00 +08:00
|
|
|
|
leaderboard.SetScores(leaderboard.Scores, new ScoreInfo
|
2020-02-20 13:51:25 +08:00
|
|
|
|
{
|
2020-08-31 18:54:22 +08:00
|
|
|
|
Rank = ScoreRank.XH,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock() },
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2020-02-20 13:51:25 +08:00
|
|
|
|
{
|
2020-08-31 18:54:22 +08:00
|
|
|
|
Id = 6602580,
|
|
|
|
|
Username = @"waaiiru",
|
|
|
|
|
Country = new Country
|
2020-02-20 13:51:25 +08:00
|
|
|
|
{
|
2020-08-31 18:54:22 +08:00
|
|
|
|
FullName = @"Spain",
|
|
|
|
|
FlagName = @"ES",
|
2020-02-20 13:51:25 +08:00
|
|
|
|
},
|
2020-08-31 18:54:22 +08:00
|
|
|
|
},
|
2022-01-30 15:16:00 +08:00
|
|
|
|
});
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-09-19 14:23:37 +08:00
|
|
|
|
private void showPersonalBest()
|
|
|
|
|
{
|
2022-01-30 15:16:00 +08:00
|
|
|
|
leaderboard.SetScores(leaderboard.Scores, new ScoreInfo
|
2019-09-19 14:23:37 +08:00
|
|
|
|
{
|
|
|
|
|
Position = 999,
|
2020-08-31 18:54:22 +08:00
|
|
|
|
Rank = ScoreRank.XH,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
2020-08-31 18:54:22 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2019-09-19 14:23:37 +08:00
|
|
|
|
{
|
2020-08-31 18:54:22 +08:00
|
|
|
|
Id = 6602580,
|
|
|
|
|
Username = @"waaiiru",
|
|
|
|
|
Country = new Country
|
2019-09-19 14:23:37 +08:00
|
|
|
|
{
|
2020-08-31 18:54:22 +08:00
|
|
|
|
FullName = @"Spain",
|
|
|
|
|
FlagName = @"ES",
|
2019-09-19 14:23:37 +08:00
|
|
|
|
},
|
2020-08-31 18:54:22 +08:00
|
|
|
|
},
|
2022-01-30 15:16:00 +08:00
|
|
|
|
});
|
2019-09-19 14:23:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-06-14 14:06:33 +08:00
|
|
|
|
private void loadMoreScores(Func<BeatmapInfo> beatmapInfo)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2021-06-14 14:06:33 +08:00
|
|
|
|
AddStep(@"Load new scores via manager", () =>
|
|
|
|
|
{
|
|
|
|
|
foreach (var score in generateSampleScores(beatmapInfo()))
|
2022-01-25 14:23:51 +08:00
|
|
|
|
scoreManager.Import(score);
|
2021-06-14 14:06:33 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void clearScores()
|
|
|
|
|
{
|
2021-12-13 18:01:20 +08:00
|
|
|
|
AddStep("Clear all scores", () => scoreManager.Delete());
|
2021-06-14 14:06:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void checkCount(int expected) =>
|
|
|
|
|
AddUntilStep("Correct count displayed", () => leaderboard.ChildrenOfType<LeaderboardScore>().Count() == expected);
|
|
|
|
|
|
2021-10-02 23:55:29 +08:00
|
|
|
|
private static ScoreInfo[] generateSampleScores(BeatmapInfo beatmapInfo)
|
2021-06-14 14:06:33 +08:00
|
|
|
|
{
|
|
|
|
|
return new[]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.XH,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now,
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[]
|
|
|
|
|
{
|
|
|
|
|
new OsuModHidden(),
|
|
|
|
|
new OsuModHardRock(),
|
|
|
|
|
new OsuModFlashlight
|
|
|
|
|
{
|
2022-02-02 08:13:19 +08:00
|
|
|
|
FollowDelay = { Value = 200 },
|
|
|
|
|
SizeMultiplier = { Value = 5 },
|
2022-02-01 15:35:05 +08:00
|
|
|
|
},
|
|
|
|
|
new OsuModDifficultyAdjust
|
|
|
|
|
{
|
2022-02-02 08:13:19 +08:00
|
|
|
|
CircleSize = { Value = 11 },
|
|
|
|
|
ApproachRate = { Value = 10 },
|
|
|
|
|
OverallDifficulty = { Value = 10 },
|
|
|
|
|
DrainRate = { Value = 10 },
|
|
|
|
|
ExtendedLimits = { Value = true }
|
2022-02-01 15:35:05 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 6602580,
|
|
|
|
|
Username = @"waaiiru",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Spain",
|
|
|
|
|
FlagName = @"ES",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.X,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddSeconds(-30),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 4608074,
|
|
|
|
|
Username = @"Skycries",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Brazil",
|
|
|
|
|
FlagName = @"BR",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.SH,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddSeconds(-70),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 1014222,
|
|
|
|
|
Username = @"eLy",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Japan",
|
|
|
|
|
FlagName = @"JP",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.S,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddMinutes(-40),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 1541390,
|
|
|
|
|
Username = @"Toukai",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Canada",
|
|
|
|
|
FlagName = @"CA",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.A,
|
|
|
|
|
Accuracy = 1,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddHours(-2),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 2243452,
|
|
|
|
|
Username = @"Satoruu",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Venezuela",
|
|
|
|
|
FlagName = @"VE",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.B,
|
|
|
|
|
Accuracy = 0.9826,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddHours(-25),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 2705430,
|
|
|
|
|
Username = @"Mooha",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"France",
|
|
|
|
|
FlagName = @"FR",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Rank = ScoreRank.C,
|
|
|
|
|
Accuracy = 0.9654,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddHours(-50),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 7151382,
|
|
|
|
|
Username = @"Mayuri Hana",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Thailand",
|
|
|
|
|
FlagName = @"TH",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-06-09 00:34:03 +08:00
|
|
|
|
Rank = ScoreRank.D,
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Accuracy = 0.6025,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-17 17:38:29 +08:00
|
|
|
|
Date = DateTime.Now.AddHours(-72),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 2051389,
|
|
|
|
|
Username = @"FunOrange",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Canada",
|
|
|
|
|
FlagName = @"CA",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-06-09 00:34:03 +08:00
|
|
|
|
Rank = ScoreRank.D,
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Accuracy = 0.5140,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-20 03:47:02 +08:00
|
|
|
|
Date = DateTime.Now.AddMonths(-3),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 6169483,
|
|
|
|
|
Username = @"-Hebel-",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Mexico",
|
|
|
|
|
FlagName = @"MX",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2018-11-28 17:33:01 +08:00
|
|
|
|
new ScoreInfo
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-06-09 00:34:03 +08:00
|
|
|
|
Rank = ScoreRank.D,
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Accuracy = 0.4222,
|
|
|
|
|
MaxCombo = 244,
|
|
|
|
|
TotalScore = 1707827,
|
2022-02-20 03:47:02 +08:00
|
|
|
|
Date = DateTime.Now.AddYears(-2),
|
2022-02-01 15:35:05 +08:00
|
|
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
|
2021-10-04 16:35:53 +08:00
|
|
|
|
BeatmapInfo = beatmapInfo,
|
2022-01-10 14:06:41 +08:00
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
|
|
|
|
2021-11-04 17:02:44 +08:00
|
|
|
|
User = new APIUser
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Id = 6702666,
|
|
|
|
|
Username = @"prhtnsm",
|
|
|
|
|
Country = new Country
|
|
|
|
|
{
|
|
|
|
|
FullName = @"Germany",
|
|
|
|
|
FlagName = @"DE",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-14 18:51:27 +08:00
|
|
|
|
private class FailableLeaderboard : BeatmapLeaderboard
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2022-01-31 00:12:03 +08:00
|
|
|
|
public new void SetErrorState(LeaderboardState state) => base.SetErrorState(state);
|
2022-01-30 15:16:00 +08:00
|
|
|
|
public new void SetScores(IEnumerable<ScoreInfo> scores, ScoreInfo userScore = default) => base.SetScores(scores, userScore);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|