Exemplo n.º 1
0
        private bool TryGenerateNote(GeneratorInput generatorInput, Note originalNote, NoteCounter counter, out PanelNote panelNote)
        {
            if (counter.IsAtMaxNotes())
            {
                panelNote = null;
                return(false);
            }

            if (!stepGenerator.TryGeneratePanel(generatorInput, settings.noteRules, out var generatedPanelIndices))
            {
                panelNote = null;
                return(false);
            }

            RemovePanelFromAvailablePanels(generatorInput.availablePanels, generatedPanelIndices);
            panelNote = GetPanelNote(originalNote, generatedPanelIndices);             // Note: Currently ignoring hold notes due to rules that prevent arrows from getting generated in some cases (ex: right foot is holding up, left foot can only alternate between left and down for 4 notes in the default ruleset)

            counter.IncrementCounter();

            generatorState.AddPanelToHistory(generatedPanelIndices);

            if (originalNote.type == NoteType.Hold)
            {
                generatorState.HoldNoteWithCurrentFoot(panelNote);
            }
            else
            {
                generatorState.AlternateFoot();
            }

            return(true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Holds note and alternates feet
 /// </summary>
 public void HoldNoteWithCurrentFoot(PanelNote panelNote)
 {
     heldPanelNotes[CurrentFoot] = panelNote;
     AlternateFootInternal();
 }
Exemplo n.º 3
0
        private bool TryGenerateMine(GeneratorInput generatorInput, Note originalNote, out PanelNote panelNote)
        {
            if (settings.disableMines)
            {
                panelNote = null;
                return(false);
            }

            if (!mineGenerator.TryGeneratePanel(generatorInput, settings.mineRules, out var generatedPanelIndices))
            {
                panelNote = null;
                return(false);
            }

            RemovePanelFromAvailablePanels(generatorInput.availablePanels, generatedPanelIndices);
            panelNote = GetPanelNote(originalNote, generatedPanelIndices);

            return(true);
        }