1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:35:10 +08:00

Extract method for marking cheese

This commit is contained in:
Bartłomiej Dach 2020-08-18 19:29:51 +02:00
parent 292d38362c
commit ff44437706

View File

@ -48,10 +48,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
if (repeatedLength < roll_min_repetitions)
continue;
for (int j = repetitionStart; j < i; j++)
{
hitObjects[j].StaminaCheese = true;
}
markObjectsAsCheese(repetitionStart, i);
}
}
@ -80,11 +77,14 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
if (tlLength < tl_min_repetitions)
continue;
for (int j = Math.Max(0, i - tlLength); j < i; j++)
{
hitObjects[j].StaminaCheese = true;
}
markObjectsAsCheese(Math.Max(0, i - tlLength), i);
}
}
private void markObjectsAsCheese(int start, int end)
{
for (int i = start; i < end; ++i)
hitObjects[i].StaminaCheese = true;
}
}
}