private static BouncyType GetBouncyType(BouncyType bouncyType,int prev,int current) { if (bouncyType == BouncyType.Bouncy || prev == current) return bouncyType; if ((bouncyType == BouncyType.Increasing || bouncyType == BouncyType.Equal) && current > prev) return BouncyType.Increasing; if ((bouncyType == BouncyType.Decreasing || bouncyType == BouncyType.Equal) && current < prev) return BouncyType.Decreasing; return BouncyType.Bouncy; }