Rename GetImmediateScore() as overload of GetScore()

This commit is contained in:
Dan Balasescu
2022-03-08 11:26:07 +09:00
parent a352a140bc
commit 2c382bd1d9
4 changed files with 26 additions and 26 deletions

View File

@ -218,6 +218,29 @@ namespace osu.Game.Rulesets.Scoring
scoreResultCounts);
}
/// <summary>
/// Given a minimal set of inputs, return the computed score for the tracked beatmap / mods combination, at the current point in time.
/// </summary>
/// <param name="mode">The <see cref="ScoringMode"/> to compute the total score in.</param>
/// <param name="maxCombo">The maximum combo achievable in the beatmap.</param>
/// <param name="statistics">Statistics to be used for calculating accuracy, bonus score, etc.</param>
/// <returns>The computed score for provided inputs.</returns>
public double GetScore(ScoringMode mode, int maxCombo, Dictionary<HitResult, int> statistics)
{
// calculate base score from statistics pairs
int computedBaseScore = 0;
foreach (var pair in statistics)
{
if (!pair.Key.AffectsAccuracy())
continue;
computedBaseScore += Judgement.ToNumericResult(pair.Key) * pair.Value;
}
return GetScore(mode, calculateAccuracyRatio(computedBaseScore), calculateComboRatio(maxCombo), statistics);
}
/// <summary>
/// Computes the total score.
/// </summary>
@ -250,29 +273,6 @@ namespace osu.Game.Rulesets.Scoring
}
}
/// <summary>
/// Given a minimal set of inputs, return the computed score for the tracked beatmap / mods combination, at the current point in time.
/// </summary>
/// <param name="mode">The <see cref="ScoringMode"/> to compute the total score in.</param>
/// <param name="maxCombo">The maximum combo achievable in the beatmap.</param>
/// <param name="statistics">Statistics to be used for calculating accuracy, bonus score, etc.</param>
/// <returns>The computed score for provided inputs.</returns>
public double GetImmediateScore(ScoringMode mode, int maxCombo, Dictionary<HitResult, int> statistics)
{
// calculate base score from statistics pairs
int computedBaseScore = 0;
foreach (var pair in statistics)
{
if (!pair.Key.AffectsAccuracy())
continue;
computedBaseScore += Judgement.ToNumericResult(pair.Key) * pair.Value;
}
return GetScore(mode, calculateAccuracyRatio(computedBaseScore), calculateComboRatio(maxCombo), statistics);
}
/// <summary>
/// Get the accuracy fraction for the provided base score.
/// </summary>