private bool CalculateStrainValues()
{
// Traverse hitObjects in pairs to calculate the strain value of NextHitObject from the strain value of CurrentHitObject and environment.
List<tpHitObject>.Enumerator HitObjectsEnumerator = tpHitObjects.GetEnumerator();
if (HitObjectsEnumerator.MoveNext() == false)
{
Reports.Add(new AiReport(Severity.Info, "Can not compute difficulty of empty beatmap."));
return false;
}
tpHitObject CurrentHitObject = HitObjectsEnumerator.Current;
tpHitObject NextHitObject;
// First hitObject starts at strain 1. 1 is the default for strain values, so we don't need to set it here. See tpHitObject.
while (HitObjectsEnumerator.MoveNext())
{
NextHitObject = HitObjectsEnumerator.Current;
NextHitObject.CalculateStrains(CurrentHitObject);
CurrentHitObject = NextHitObject;
}
return true;
}