// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Modes; using osu.Game.Modes.Objects; using System; using System.Collections.Generic; namespace osu.Game.Beatmaps { public abstract class DifficultyCalculator { protected abstract PlayMode PlayMode { get; } protected double TimeRate = 1; protected abstract double CalculateInternal(Dictionary categoryDifficulty); private void loadTiming() { // TODO: Handle mods int audioRate = 100; TimeRate = audioRate / 100.0; } public double Calculate(Dictionary categoryDifficulty = null) { loadTiming(); double difficulty = CalculateInternal(categoryDifficulty); return difficulty; } } public abstract class DifficultyCalculator : DifficultyCalculator where T : HitObject { protected List Objects; protected abstract HitObjectConverter Converter { get; } protected DifficultyCalculator(Beatmap beatmap) { Objects = Converter.Convert(beatmap); PreprocessHitObjects(); } protected virtual void PreprocessHitObjects() { } } }