1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 15:50:14 +08:00

Merge pull request #34725 from bdach/bpm-grouping-off-by-one-once-more

Fix BPM grouping mode not defining a group for 290 - 300 BPM range
This commit is contained in:
Bartłomiej Dach
2025-08-18 13:32:16 +02:00
committed by GitHub
Unverified
2 changed files with 5 additions and 3 deletions
@@ -235,6 +235,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
addBeatmapSet(applyBPM(95), beatmapSets, out var beatmap95);
addBeatmapSet(applyBPM(269.5), beatmapSets, out var beatmap269);
addBeatmapSet(applyBPM(270), beatmapSets, out var beatmap270);
addBeatmapSet(applyBPM(299), beatmapSets, out var beatmap299);
addBeatmapSet(applyBPM(300), beatmapSets, out var beatmap300);
addBeatmapSet(applyBPM(330), beatmapSets, out var beatmap330);
@@ -243,7 +244,8 @@ namespace osu.Game.Tests.Visual.SongSelectV2
assertGroup(results, 1, "60 - 70 BPM", new[] { beatmap59, beatmap60 }, ref total);
assertGroup(results, 2, "90 - 100 BPM", new[] { beatmap90, beatmap95 }, ref total);
assertGroup(results, 3, "270 - 280 BPM", new[] { beatmap269, beatmap270 }, ref total);
assertGroup(results, 4, "Over 300 BPM", new[] { beatmap300, beatmap330 }, ref total);
assertGroup(results, 4, "290 - 300 BPM", new[] { beatmap299 }, ref total);
assertGroup(results, 5, "Over 300 BPM", new[] { beatmap300, beatmap330 }, ref total);
assertTotal(results, total);
}
@@ -352,13 +352,13 @@ namespace osu.Game.Screens.SelectV2
if (bpm < 60)
return new GroupDefinition(60, "Under 60 BPM");
for (int i = 70; i < 300; i += 10)
for (int i = 70; i <= 300; i += 10)
{
if (bpm < i)
return new GroupDefinition(i, $"{i - 10} - {i} BPM");
}
return new GroupDefinition(300, "Over 300 BPM");
return new GroupDefinition(301, "Over 300 BPM");
}
private GroupDefinition defineGroupByStars(double stars)