mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-10 18:10:46 +09:00
Remove static method
This commit is contained in:
parent
6edaf218ff
commit
a88ee33329
3 changed files with 3 additions and 5 deletions
|
@ -37,7 +37,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
|
|
||||||
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
||||||
{
|
{
|
||||||
var maxCombo = GetMaxCombo(beatmap);
|
var maxCombo = beatmap.GetMaxCombo();
|
||||||
int maxTinyDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<TinyDroplet>().Count());
|
int maxTinyDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<TinyDroplet>().Count());
|
||||||
int maxDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<Droplet>().Count()) - maxTinyDroplets;
|
int maxDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<Droplet>().Count()) - maxTinyDroplets;
|
||||||
int maxFruits = beatmap.HitObjects.Sum(h => h is Fruit ? 1 : (h as JuiceStream)?.NestedHitObjects.Count(n => n is Fruit) ?? 0);
|
int maxFruits = beatmap.HitObjects.Sum(h => h is Fruit ? 1 : (h as JuiceStream)?.NestedHitObjects.Count(n => n is Fruit) ?? 0);
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
var mods = ParseMods(ruleset, Mods, ModOptions);
|
var mods = ParseMods(ruleset, Mods, ModOptions);
|
||||||
var beatmap = workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods);
|
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 statistics = GenerateHitResults(Accuracy / 100, beatmap, Misses, Mehs, Goods);
|
||||||
var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo)
|
var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo)
|
||||||
{
|
{
|
||||||
|
@ -83,8 +83,6 @@ namespace PerformanceCalculator.Simulate
|
||||||
OutputPerformance(scoreInfo, performanceAttributes, difficultyAttributes);
|
OutputPerformance(scoreInfo, performanceAttributes, difficultyAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static int GetMaxCombo(IBeatmap beatmap) => beatmap.GetMaxCombo();
|
|
||||||
|
|
||||||
protected abstract Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood);
|
protected abstract Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood);
|
||||||
|
|
||||||
protected virtual double GetAccuracy(Dictionary<HitResult, int> statistics) => 0;
|
protected virtual double GetAccuracy(Dictionary<HitResult, int> statistics) => 0;
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace PerformanceCalculator.Simulate
|
||||||
|
|
||||||
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
|
||||||
{
|
{
|
||||||
var totalResultCount = GetMaxCombo(beatmap);
|
var totalResultCount = beatmap.GetMaxCombo();
|
||||||
|
|
||||||
int countGreat;
|
int countGreat;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue