// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Game.Rulesets.Objects; namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns { /// /// Generator to create a pattern from a hit object. /// internal abstract class PatternGenerator { /// /// The last pattern. /// protected readonly Pattern PreviousPattern; /// /// The hit object to create the pattern for. /// protected readonly HitObject HitObject; /// /// The beatmap which is a part of. /// protected readonly ManiaBeatmap Beatmap; protected readonly int TotalColumns; protected PatternGenerator(HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern) { ArgumentNullException.ThrowIfNull(hitObject); ArgumentNullException.ThrowIfNull(beatmap); ArgumentNullException.ThrowIfNull(previousPattern); HitObject = hitObject; Beatmap = beatmap; PreviousPattern = previousPattern; TotalColumns = Beatmap.TotalColumns; } /// /// Generates the patterns for , each filled with hit objects. /// /// The s containing the hit objects. public abstract IEnumerable Generate(); } }