diff --git a/PerformanceCalculator/Simulate/CatchSimulateCommand.cs b/PerformanceCalculator/Simulate/CatchSimulateCommand.cs index 932ed3be5..d4b7a2001 100644 --- a/PerformanceCalculator/Simulate/CatchSimulateCommand.cs +++ b/PerformanceCalculator/Simulate/CatchSimulateCommand.cs @@ -35,12 +35,9 @@ public class CatchSimulateCommand : SimulateCommand public override Ruleset Ruleset => new CatchRuleset(); - protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.HitObjects.Count(h => h is Fruit) - + beatmap.HitObjects.OfType().SelectMany(j => j.NestedHitObjects).Count(h => !(h is TinyDroplet)); - protected override Dictionary GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood) { - var maxCombo = GetMaxCombo(beatmap); + var maxCombo = beatmap.GetMaxCombo(); int maxTinyDroplets = beatmap.HitObjects.OfType().Sum(s => s.NestedHitObjects.OfType().Count()); int maxDroplets = beatmap.HitObjects.OfType().Sum(s => s.NestedHitObjects.OfType().Count()) - maxTinyDroplets; int maxFruits = beatmap.HitObjects.Sum(h => h is Fruit ? 1 : (h as JuiceStream)?.NestedHitObjects.Count(n => n is Fruit) ?? 0); diff --git a/PerformanceCalculator/Simulate/ManiaSimulateCommand.cs b/PerformanceCalculator/Simulate/ManiaSimulateCommand.cs index b6d66affc..22ed21a4a 100644 --- a/PerformanceCalculator/Simulate/ManiaSimulateCommand.cs +++ b/PerformanceCalculator/Simulate/ManiaSimulateCommand.cs @@ -35,8 +35,6 @@ public class ManiaSimulateCommand : SimulateCommand public override Ruleset Ruleset => new ManiaRuleset(); - protected override int GetMaxCombo(IBeatmap beatmap) => 0; - protected override Dictionary GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood) { // One judgement per normal note. Two judgements per hold note (head + tail). diff --git a/PerformanceCalculator/Simulate/OsuSimulateCommand.cs b/PerformanceCalculator/Simulate/OsuSimulateCommand.cs index 10151eef8..2d4744f92 100644 --- a/PerformanceCalculator/Simulate/OsuSimulateCommand.cs +++ b/PerformanceCalculator/Simulate/OsuSimulateCommand.cs @@ -43,8 +43,6 @@ public class OsuSimulateCommand : SimulateCommand public override Ruleset Ruleset => new OsuRuleset(); - protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.GetMaxCombo(); - protected override Dictionary GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood) { int countGreat; diff --git a/PerformanceCalculator/Simulate/SimulateCommand.cs b/PerformanceCalculator/Simulate/SimulateCommand.cs index be3dcb5d2..c0d3cac39 100644 --- a/PerformanceCalculator/Simulate/SimulateCommand.cs +++ b/PerformanceCalculator/Simulate/SimulateCommand.cs @@ -65,7 +65,7 @@ public override void Execute() var mods = ParseMods(ruleset, Mods, ModOptions); var beatmap = workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods); - var beatmapMaxCombo = GetMaxCombo(beatmap); + var beatmapMaxCombo = beatmap.GetMaxCombo(); var statistics = GenerateHitResults(Accuracy / 100, beatmap, Misses, Mehs, Goods); var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo) { @@ -83,8 +83,6 @@ public override void Execute() OutputPerformance(scoreInfo, performanceAttributes, difficultyAttributes); } - protected abstract int GetMaxCombo(IBeatmap beatmap); - protected abstract Dictionary GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood); protected virtual double GetAccuracy(Dictionary statistics) => 0; diff --git a/PerformanceCalculator/Simulate/TaikoSimulateCommand.cs b/PerformanceCalculator/Simulate/TaikoSimulateCommand.cs index 9559e1c42..66afcd07a 100644 --- a/PerformanceCalculator/Simulate/TaikoSimulateCommand.cs +++ b/PerformanceCalculator/Simulate/TaikoSimulateCommand.cs @@ -3,14 +3,12 @@ using System; using System.Collections.Generic; -using System.Linq; using JetBrains.Annotations; using McMaster.Extensions.CommandLineUtils; using osu.Game.Beatmaps; using osu.Game.Rulesets; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Taiko; -using osu.Game.Rulesets.Taiko.Objects; namespace PerformanceCalculator.Simulate { @@ -31,11 +29,9 @@ public class TaikoSimulateCommand : SimulateCommand public override Ruleset Ruleset => new TaikoRuleset(); - protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.HitObjects.OfType().Count(); - protected override Dictionary GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood) { - var totalResultCount = GetMaxCombo(beatmap); + var totalResultCount = beatmap.GetMaxCombo(); int countGreat;