1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-07 04:13:38 +08:00

Change song select grouping to be divided into 10 BPM groups

This commit is contained in:
Dean Herbert
2025-07-25 16:38:22 +09:00
Unverified
parent ac9ede8fd8
commit c6cbda5ecc
2 changed files with 11 additions and 8 deletions
@@ -229,16 +229,16 @@ namespace osu.Game.Tests.Visual.SongSelectV2
addBeatmapSet(applyBPM(30), beatmapSets, out var beatmap30);
addBeatmapSet(applyBPM(60), beatmapSets, out var beatmap60);
addBeatmapSet(applyBPM(90), beatmapSets, out var beatmap90);
addBeatmapSet(applyBPM(120), beatmapSets, out var beatmap120);
addBeatmapSet(applyBPM(95), beatmapSets, out var beatmap95);
addBeatmapSet(applyBPM(270), beatmapSets, out var beatmap270);
addBeatmapSet(applyBPM(300), beatmapSets, out var beatmap300);
addBeatmapSet(applyBPM(330), beatmapSets, out var beatmap330);
var results = await runGrouping(GroupMode.BPM, beatmapSets);
assertGroup(results, 0, "Under 60 BPM", new[] { beatmap30 }, ref total);
assertGroup(results, 1, "Under 120 BPM", new[] { beatmap60, beatmap90 }, ref total);
assertGroup(results, 2, "Under 180 BPM", new[] { beatmap120 }, ref total);
assertGroup(results, 3, "Under 300 BPM", new[] { beatmap270 }, ref total);
assertGroup(results, 1, "60 - 70 BPM", new[] { beatmap60 }, ref total);
assertGroup(results, 2, "90 - 100 BPM", new[] { beatmap90, beatmap95 }, ref total);
assertGroup(results, 3, "270 - 280 BPM", new[] { beatmap270 }, ref total);
assertGroup(results, 4, "Over 300 BPM", new[] { beatmap300, beatmap330 }, ref total);
assertTotal(results, total);
}
@@ -319,13 +319,16 @@ namespace osu.Game.Screens.SelectV2
private GroupDefinition defineGroupByBPM(double bpm)
{
for (int i = 1; i < 6; i++)
if (bpm < 60)
return new GroupDefinition(60, "Under 60 BPM");
for (int i = 60; i < 300; i += 10)
{
if (bpm < i * 60)
return new GroupDefinition(i, $"Under {i * 60} BPM");
if (bpm < i)
return new GroupDefinition(i, $"{i - 10} - {i} BPM");
}
return new GroupDefinition(6, "Over 300 BPM");
return new GroupDefinition(300, "Over 300 BPM");
}
private GroupDefinition defineGroupByStars(double stars)