mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 03:33:22 +08:00
Simplify GetMaximumAchievableCombo further
This commit is contained in:
parent
423f6f90f2
commit
d75543ad68
@ -107,11 +107,8 @@ namespace osu.Game.Scoring
|
||||
/// 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"/>.
|
||||
|
Loading…
Reference in New Issue
Block a user