mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Merge remote-tracking branch 'origin/score-test' into score-test
This commit is contained in:
commit
d6a3564c01
@ -150,6 +150,17 @@ namespace osu.Game.Tests.Rulesets.Scoring
|
|||||||
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value, 0.5));
|
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value, 0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestEmptyBeatmap(
|
||||||
|
[Values(ScoringMode.Standardised, ScoringMode.Classic)]
|
||||||
|
ScoringMode scoringMode)
|
||||||
|
{
|
||||||
|
scoreProcessor.Mode.Value = scoringMode;
|
||||||
|
scoreProcessor.ApplyBeatmap(new TestBeatmap(new RulesetInfo()));
|
||||||
|
|
||||||
|
Assert.IsTrue(Precision.AlmostEquals(0, scoreProcessor.TotalScore.Value));
|
||||||
|
}
|
||||||
|
|
||||||
[TestCase(HitResult.IgnoreHit, HitResult.IgnoreMiss)]
|
[TestCase(HitResult.IgnoreHit, HitResult.IgnoreMiss)]
|
||||||
[TestCase(HitResult.Meh, HitResult.Miss)]
|
[TestCase(HitResult.Meh, HitResult.Miss)]
|
||||||
[TestCase(HitResult.Ok, HitResult.Miss)]
|
[TestCase(HitResult.Ok, HitResult.Miss)]
|
||||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
private readonly double accuracyPortion;
|
private readonly double accuracyPortion;
|
||||||
private readonly double comboPortion;
|
private readonly double comboPortion;
|
||||||
|
|
||||||
private int maxHighestCombo;
|
private int maxAchievableCombo;
|
||||||
private double maxBaseScore;
|
private double maxBaseScore;
|
||||||
private double rollingMaxBaseScore;
|
private double rollingMaxBaseScore;
|
||||||
private double baseScore;
|
private double baseScore;
|
||||||
@ -195,9 +195,9 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
private double getScore(ScoringMode mode)
|
private double getScore(ScoringMode mode)
|
||||||
{
|
{
|
||||||
return GetScore(mode, maxHighestCombo,
|
return GetScore(mode, maxAchievableCombo,
|
||||||
maxBaseScore > 0 ? baseScore / maxBaseScore : 0,
|
maxBaseScore > 0 ? baseScore / maxBaseScore : 0,
|
||||||
maxHighestCombo > 0 ? (double)HighestCombo.Value / maxHighestCombo : 1,
|
maxAchievableCombo > 0 ? (double)HighestCombo.Value / maxAchievableCombo : 1,
|
||||||
scoreResultCounts);
|
scoreResultCounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
if (storeResults)
|
if (storeResults)
|
||||||
{
|
{
|
||||||
maxHighestCombo = HighestCombo.Value;
|
maxAchievableCombo = HighestCombo.Value;
|
||||||
maxBaseScore = baseScore;
|
maxBaseScore = baseScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user