mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-09 09:35:15 +09:00
Refactor GetMaxCombo
This commit is contained in:
parent
156867cba3
commit
6edaf218ff
5 changed files with 1 additions and 10 deletions
|
@ -35,9 +35,6 @@ namespace PerformanceCalculator.Simulate
|
|||
|
||||
public override Ruleset Ruleset => new CatchRuleset();
|
||||
|
||||
protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.HitObjects.Count(h => h is Fruit)
|
||||
+ beatmap.HitObjects.OfType<JuiceStream>().SelectMany(j => j.NestedHitObjects).Count(h => !(h is TinyDroplet));
|
||||
|
||||
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
||||
{
|
||||
var maxCombo = GetMaxCombo(beatmap);
|
||||
|
|
|
@ -35,8 +35,6 @@ namespace PerformanceCalculator.Simulate
|
|||
|
||||
public override Ruleset Ruleset => new ManiaRuleset();
|
||||
|
||||
protected override int GetMaxCombo(IBeatmap beatmap) => 0;
|
||||
|
||||
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
||||
{
|
||||
// One judgement per normal note. Two judgements per hold note (head + tail).
|
||||
|
|
|
@ -43,8 +43,6 @@ namespace PerformanceCalculator.Simulate
|
|||
|
||||
public override Ruleset Ruleset => new OsuRuleset();
|
||||
|
||||
protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.GetMaxCombo();
|
||||
|
||||
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
||||
{
|
||||
int countGreat;
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace PerformanceCalculator.Simulate
|
|||
OutputPerformance(scoreInfo, performanceAttributes, difficultyAttributes);
|
||||
}
|
||||
|
||||
protected abstract int GetMaxCombo(IBeatmap beatmap);
|
||||
protected static int GetMaxCombo(IBeatmap beatmap) => beatmap.GetMaxCombo();
|
||||
|
||||
protected abstract Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood);
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ namespace PerformanceCalculator.Simulate
|
|||
|
||||
public override Ruleset Ruleset => new TaikoRuleset();
|
||||
|
||||
protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.HitObjects.OfType<Hit>().Count();
|
||||
|
||||
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
||||
{
|
||||
var totalResultCount = GetMaxCombo(beatmap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue