mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 21:52:54 +08:00
Make RankFromScore()
's dictionary param readonly
Just to make sure nobody tries any "funny" business.
This commit is contained in:
parent
5bae9074aa
commit
cb8ec48717
@ -89,7 +89,7 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
||||
return baseIncrease * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(combo_cap, combo_base));
|
||||
}
|
||||
|
||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
if (accuracy == accuracy_cutoff_x)
|
||||
return ScoreRank.X;
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
||||
{
|
||||
}
|
||||
|
||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
||||
* strongScaleValue(result);
|
||||
}
|
||||
|
||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||
|
||||
|
@ -505,7 +505,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// <summary>
|
||||
/// Given an accuracy (0..1), return the correct <see cref="ScoreRank"/>.
|
||||
/// </summary>
|
||||
public virtual ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public virtual ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
if (accuracy == accuracy_cutoff_x)
|
||||
return ScoreRank.X;
|
||||
|
Loading…
Reference in New Issue
Block a user