diff --git a/osu.Game.Tests/Visual/TestCaseMultiScreen.cs b/osu.Game.Tests/Visual/TestCaseMultiScreen.cs index fc4037f58b..804e3c5b1f 100644 --- a/osu.Game.Tests/Visual/TestCaseMultiScreen.cs +++ b/osu.Game.Tests/Visual/TestCaseMultiScreen.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using NUnit.Framework; -using osu.Framework.Screens; using osu.Game.Screens.Multi; using osu.Game.Screens.Multi.Lounge; using osu.Game.Screens.Multi.Lounge.Components; @@ -26,8 +25,6 @@ public TestCaseMultiScreen() Multiplayer multi = new Multiplayer(); AddStep(@"show", () => LoadScreen(multi)); - AddWaitStep(5); - AddStep(@"exit", multi.Exit); } } } diff --git a/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs b/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs index ecfca9c589..c6e54c52e7 100644 --- a/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs +++ b/osu.Game/Rulesets/Difficulty/DifficultyCalculator.cs @@ -25,14 +25,12 @@ protected DifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap) protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double clockRate) { - var attributes = CreateDifficultyAttributes(); - attributes.Mods = mods; + var skills = CreateSkills(); if (!beatmap.HitObjects.Any()) - return attributes; + return CreateDifficultyAttributes(beatmap, mods, skills, clockRate); var difficultyHitObjects = CreateDifficultyHitObjects(beatmap, clockRate).OrderBy(h => h.BaseObject.StartTime).ToList(); - var skills = CreateSkills(); double sectionLength = SectionLength * clockRate; @@ -60,9 +58,7 @@ protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, foreach (Skill s in skills) s.SaveCurrentPeak(); - PopulateAttributes(attributes, beatmap, skills, clockRate); - - return attributes; + return CreateDifficultyAttributes(beatmap, mods, skills, clockRate); } /// @@ -108,13 +104,13 @@ IEnumerable createDifficultyAdjustmentModCombinations(IEnumerable curr protected virtual Mod[] DifficultyAdjustmentMods => Array.Empty(); /// - /// Populates after difficulty has been processed. + /// Creates to describe beatmap's calculated difficulty. /// - /// The to populate with information about the difficulty of . /// The whose difficulty was processed. + /// The s that were applied during the process. /// The skills which processed the difficulty. /// The rate at which the gameplay clock is run at. - protected abstract void PopulateAttributes(DifficultyAttributes attributes, IBeatmap beatmap, Skill[] skills, double clockRate); + protected abstract DifficultyAttributes CreateDifficultyAttributes(IBeatmap beatmap, Mod[] mods, Skill[] skills, double clockRate); /// /// Enumerates s to be processed from s in the . @@ -129,11 +125,5 @@ IEnumerable createDifficultyAdjustmentModCombinations(IEnumerable curr /// /// The s. protected abstract Skill[] CreateSkills(); - - /// - /// Creates an empty . - /// - /// The empty . - protected abstract DifficultyAttributes CreateDifficultyAttributes(); } }