-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented IDifficultyCalculatorBeatmap
to move diffcalc-specific functions into specific classes
#29989
base: master
Are you sure you want to change the base?
Implemented IDifficultyCalculatorBeatmap
to move diffcalc-specific functions into specific classes
#29989
Conversation
With this sort of thing and #28473 I do worry a bit if |
I agree with @bdach, maybe difficulty calculators shouldn't use |
Does this mean that I should remade it to add something like |
Last I tried this avenue (exactly when exploring solutions to #28473, mind) I ended up with a bunch of generic badness. The primary problem here is |
@bdach I don't think that's going to be relevant here because the // Difficulty calculators internally will use this
interface IDifficultyCalculatorBeatmap : IBeatmap
{
}
// Private implementation, could either house stuff to do with progressive difficulty, or be overridden to do as such.
private class DifficultyCalculatorBeatmap : IDifficultyCalculatorBeatmap
{
public DifficultyCalculatorBeatmap(IBeatmap baseBeatmap) { }
// Delegations to baseBeatmap, or custom implementation for progressive difficulty.
} At least, I can't see why this wouldn't work in principle. I suggest you try going down this route and see if anything blocking comes up - if it does then it needs more discussion because I would hope things to be this simple. |
If I understand your proposal correctly this sort of decorator pattern probably works. If it does, then sure I guess. I might have overlooked that. |
IBeatmap
to allow for progressive calculationIDifficultyCalculationBeatmap
to move diffcalc-specific functions into specific classes
IDifficultyCalculationBeatmap
to move diffcalc-specific functions into specific classesIDifficultyCalculatorBeatmap
to move diffcalc-specific functions into specific classes
BIG WARNING |
Part of this PR - #29482
Calculation of MaxCombo and ObjectsCount time complexity is changed from O(t^2) to O(t) for progressive calculation.
This significantly cuts the time of
TimedDifficultyAttributes
calculation.