// 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.Beatmaps; 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 IBeatmap Beatmap; protected readonly int TotalColumns; protected PatternGenerator(HitObject hitObject, IBeatmap beatmap, int totalColumns, Pattern previousPattern) { ArgumentNullException.ThrowIfNull(hitObject); ArgumentNullException.ThrowIfNull(beatmap); ArgumentNullException.ThrowIfNull(previousPattern); HitObject = hitObject; Beatmap = beatmap; PreviousPattern = previousPattern; TotalColumns = totalColumns; } /// /// Generates the patterns for , each filled with hit objects. /// /// The s containing the hit objects. public abstract IEnumerable Generate(); } }