Simplify GetMaximumAchievableCombo further

This commit is contained in:
Dan Balasescu 2022-08-29 15:36:10 +09:00
parent 423f6f90f2
commit d75543ad68
1 changed files with 2 additions and 5 deletions

View File

@ -107,11 +107,8 @@ public long GetTotalScore([NotNull] ScoreInfo score, ScoringMode mode = ScoringM
/// Retrieves the maximum achievable combo for the provided score.
/// </summary>
/// <param name="score">The <see cref="ScoreInfo"/> to compute the maximum achievable combo for.</param>
/// <returns>The maximum achievable combo. A <see langword="null"/> return value indicates the difficulty cache has failed to retrieve the combo.</returns>
public int GetMaximumAchievableCombo([NotNull] ScoreInfo score)
{
return Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r.AffectsCombo()).Select(r => score.Statistics.GetValueOrDefault(r)).Sum();
}
/// <returns>The maximum achievable combo.</returns>
public int GetMaximumAchievableCombo([NotNull] ScoreInfo score) => score.MaximumStatistics.Where(kvp => kvp.Key.AffectsCombo()).Sum(kvp => kvp.Value);
/// <summary>
/// Provides the total score of a <see cref="ScoreInfo"/>. Responds to changes in the currently-selected <see cref="ScoringMode"/>.