public static Sequence[] CreateSequenceArray(IDictionary <Move, IEnemy[]> actions, int numberOfBeats) { //create a general array of what inputs will be for the player BeatEvent[] playerSequence = CreatePlayerSequence(numberOfBeats); //create a list of the sequences needed List <Sequence> sequenceList = new List <Sequence>(); foreach (KeyValuePair <Move, IEnemy[]> action in actions) { //TODO add data from move Move move = action.Key; sequenceList.Add(new Sequence(move)); } //distribute the playerSequence amounst the sequence List foreach (BeatEvent beat in playerSequence) { //finds all the active beats at this instance HashSet <int> activeBeats = FindActiveBeats(beat.GetNumNotes(), sequenceList.Count); for (int i = 0; i < sequenceList.Count; i++) { //add a note to each sequence Sequence sequence = sequenceList[i]; int duration = beat.GetDuration(); int beatPos = beat.GetBeatPos(); //set the note to be a rest or not bool isRest = !activeBeats.Contains(i); Note note = new Note(duration, isRest, beatPos); sequence.AddNote(note); } } return(sequenceList.ToArray()); }