From c6cbda5ecc6e058c9bc1663118b3840ae9f1614b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 25 Jul 2025 16:38:22 +0900 Subject: [PATCH] Change song select grouping to be divided into 10 BPM groups --- .../SongSelectV2/BeatmapCarouselFilterGroupingTest.cs | 8 ++++---- .../Screens/SelectV2/BeatmapCarouselFilterGrouping.cs | 11 +++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselFilterGroupingTest.cs b/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselFilterGroupingTest.cs index 946e95398d..9ab8c56234 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselFilterGroupingTest.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselFilterGroupingTest.cs @@ -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); } diff --git a/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs b/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs index cb68e2d6b5..14d7d207c0 100644 --- a/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs +++ b/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs @@ -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)