// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Game.Rulesets.Taiko.Objects; namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data { /// /// Encodes a list of s. /// s with the same are grouped together. /// public class AlternatingMonoPattern { /// /// s that are grouped together within this . /// public readonly List MonoStreaks = new List(); /// /// The parent that contains this /// public RepeatingHitPatterns? Parent; /// /// Index of this within it's parent /// public int Index; /// /// Determine if this is a repetition of another . This /// is a strict comparison and is true if and only if the colour sequence is exactly the same. /// public bool IsRepetitionOf(AlternatingMonoPattern other) { return HasIdenticalMonoLength(other) && other.MonoStreaks.Count == MonoStreaks.Count && other.MonoStreaks[0].HitType == MonoStreaks[0].HitType; } /// /// Determine if this has the same mono length of another . /// public bool HasIdenticalMonoLength(AlternatingMonoPattern other) { return other.MonoStreaks[0].RunLength == MonoStreaks[0].RunLength; } } }