From c6a640db55aa386b8acc05fb788c08cfee76aafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 18 Aug 2020 19:34:44 +0200 Subject: [PATCH] Remove superfluous IsRepeat field --- .../TaikoDifficultyHitObjectRhythm.cs | 4 +--- .../Difficulty/Skills/Rhythm.cs | 2 +- .../Difficulty/TaikoDifficultyCalculator.cs | 18 +++++++++--------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObjectRhythm.cs b/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObjectRhythm.cs index 0ad885d9bd..9c22eff22a 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObjectRhythm.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObjectRhythm.cs @@ -7,13 +7,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing { public readonly double Difficulty; public readonly double Ratio; - public readonly bool IsRepeat; - public TaikoDifficultyHitObjectRhythm(int numerator, int denominator, double difficulty, bool isRepeat) + public TaikoDifficultyHitObjectRhythm(int numerator, int denominator, double difficulty) { Ratio = numerator / (double)denominator; Difficulty = difficulty; - IsRepeat = isRepeat; } } } diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Skills/Rhythm.cs b/osu.Game.Rulesets.Taiko/Difficulty/Skills/Rhythm.cs index caf1acccf4..483e94cd70 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/Skills/Rhythm.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/Skills/Rhythm.cs @@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills TaikoDifficultyHitObject hitobject = (TaikoDifficultyHitObject)current; notesSinceRhythmChange += 1; - if (hitobject.Rhythm.IsRepeat) + if (hitobject.Rhythm.Difficulty == 0.0) { return 0.0; } diff --git a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs index 789fd7c63b..7a9f1765ae 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyCalculator.cs @@ -26,15 +26,15 @@ namespace osu.Game.Rulesets.Taiko.Difficulty private readonly TaikoDifficultyHitObjectRhythm[] commonRhythms = { - new TaikoDifficultyHitObjectRhythm(1, 1, 0.0, true), - new TaikoDifficultyHitObjectRhythm(2, 1, 0.3, false), - new TaikoDifficultyHitObjectRhythm(1, 2, 0.5, false), - new TaikoDifficultyHitObjectRhythm(3, 1, 0.3, false), - new TaikoDifficultyHitObjectRhythm(1, 3, 0.35, false), - new TaikoDifficultyHitObjectRhythm(3, 2, 0.6, false), - new TaikoDifficultyHitObjectRhythm(2, 3, 0.4, false), - new TaikoDifficultyHitObjectRhythm(5, 4, 0.5, false), - new TaikoDifficultyHitObjectRhythm(4, 5, 0.7, false) + new TaikoDifficultyHitObjectRhythm(1, 1, 0.0), + new TaikoDifficultyHitObjectRhythm(2, 1, 0.3), + new TaikoDifficultyHitObjectRhythm(1, 2, 0.5), + new TaikoDifficultyHitObjectRhythm(3, 1, 0.3), + new TaikoDifficultyHitObjectRhythm(1, 3, 0.35), + new TaikoDifficultyHitObjectRhythm(3, 2, 0.6), + new TaikoDifficultyHitObjectRhythm(2, 3, 0.4), + new TaikoDifficultyHitObjectRhythm(5, 4, 0.5), + new TaikoDifficultyHitObjectRhythm(4, 5, 0.7) }; public TaikoDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)