mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Eliminate unnecessary loop
This commit is contained in:
@ -80,6 +80,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private double repetitionPenalties()
|
private double repetitionPenalties()
|
||||||
{
|
{
|
||||||
|
const int l = 2;
|
||||||
double penalty = 1.0;
|
double penalty = 1.0;
|
||||||
|
|
||||||
monoHistory.Add(currentMonoLength);
|
monoHistory.Add(currentMonoLength);
|
||||||
@ -87,8 +88,6 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
if (monoHistory.Count > mono_history_max_length)
|
if (monoHistory.Count > mono_history_max_length)
|
||||||
monoHistory.RemoveAt(0);
|
monoHistory.RemoveAt(0);
|
||||||
|
|
||||||
for (int l = 2; l <= mono_history_max_length / 2; l++)
|
|
||||||
{
|
|
||||||
for (int start = monoHistory.Count - l - 1; start >= 0; start--)
|
for (int start = monoHistory.Count - l - 1; start >= 0; start--)
|
||||||
{
|
{
|
||||||
bool samePattern = true;
|
bool samePattern = true;
|
||||||
@ -109,7 +108,6 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return penalty;
|
return penalty;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user