Example #1
0
        public static void Calculate22 (List<Node> result, Beat beat, int distance_from_start, Panel a, Panel b, Panel c, Panel d) {
            if (!Panel.IsBracketable(a.index, b.index) || !Panel.IsBracketable(c.index, d.index)) { return; }
            bool is_force_tap = beat.hasTapTypeOrNoneOnly(TapType.Force);

            Iterate.Foot2((foot_a, foot_b) => {
                Iterate.Part2(foot_a, a.index, b.index, (a_0, a_1) => {
                    Iterate.Part2(foot_b, c.index, d.index, (b_0, b_1) => {
                        if (
                            is_force_tap &&
                            (
                                a_0 == Limb.INDEX_EXTRA ||
                                a_1 == Limb.INDEX_EXTRA ||
                                b_0 == Limb.INDEX_EXTRA ||
                                b_1 == Limb.INDEX_EXTRA
                            )
                        ) {
                            return;
                        }

                        Node state = new Node(beat.second, distance_from_start);
                        state.limbs[foot_a] = new Limb();
                        state.limbs[foot_a][a_0] = new Part(beat, a);
                        state.limbs[foot_a][a_1] = new Part(beat, b);
                        state.limbs[foot_b] = new Limb();
                        state.limbs[foot_b][b_0] = new Part(beat, c);
                        state.limbs[foot_b][b_1] = new Part(beat, d);
                        state.sanityCheck();
                        result.Add(state);
                    });
                });
            });
        }
Example #2
0
        public static void Calculate31 (List<Node> result, Beat beat, int distance_from_start, Panel a, Panel b, Panel c, Panel d) {
            if (!Panel.IsBracketable(a.index, b.index, c.index)) { return; }

            Iterate.Foot2((foot_a, foot_b) => {
                Iterate.Part1(foot_b, (b_0) => {
                    {
                        Node state = new Node(beat.second, distance_from_start);
                        state.limbs[foot_a] = new Limb();
                        LimbHelper.Do3Bracket(state, foot_a, true, beat, a, b, c);
                        state.limbs[foot_b] = new Limb();
                        state.limbs[foot_b][b_0] = new Part(beat, d);
                        state.sanityCheck();
                        result.Add(state);
                    }
                    {
                        Node state = new Node(beat.second, distance_from_start);
                        state.limbs[foot_a] = new Limb();
                        LimbHelper.Do3Bracket(state, foot_a, false, beat, a, b, c);
                        state.limbs[foot_b] = new Limb();
                        state.limbs[foot_b][b_0] = new Part(beat, d);
                        state.sanityCheck();
                        result.Add(state);
                    }
                });
            });
        }
Example #3
0
        public static void Calculate32 (List<Node> result, Beat beat, int distance_from_start, Panel a, Panel b, Panel c, Panel d, Panel e) {
            if (!Panel.IsBracketable(a.index, b.index, c.index) || !Panel.IsBracketable(d.index, e.index)) { return; }
            bool is_force_tap =
                beat.notes[d.index_playable].tap == TapType.Force &&
                beat.notes[e.index_playable].tap == TapType.Force;

            Panel front = LimbHelper.GetFrontPanel(a, b, c);
            Panel back = LimbHelper.GetBackPanel(a, b, c);
            Panel center = LimbHelper.GetCenterPanel(a, b, c);

            Iterate.Foot2((foot_a, foot_b) => {
                bool face_front = (back.index < d.index || back.index < e.index);
                if (foot_a == Node.INDEX_RIGHT_FOOT) { face_front = !face_front; }
                Iterate.Part2(foot_b, d.index, e.index, (b_0, b_1) => {
                    if (
                        is_force_tap &&
                        (
                            b_0 == Limb.INDEX_EXTRA ||
                            b_1 == Limb.INDEX_EXTRA
                        )
                    ) {
                        return;
                    }

                    Node state = new Node(beat.second, distance_from_start);
                    state.limbs[foot_a] = new Limb();
                    LimbHelper.Do3Bracket(state, foot_a, face_front, beat, a, b, c);
                    state.limbs[foot_b] = new Limb();
                    state.limbs[foot_b][b_0] = new Part(beat, d);
                    state.limbs[foot_b][b_1] = new Part(beat, e);
                    state.sanityCheck();
                    result.Add(state);
                });
            });
        }
Example #4
0
        public static void Calculate1 (List<Node> result, Beat beat, int distance_from_start, Panel a) {
            bool is_force_tap = beat.hasTapTypeOrNoneOnly(TapType.Force);

            Iterate.Foot1((foot) => {
                Iterate.Part1(foot, (_0) => {
                    if (is_force_tap && _0 == Limb.INDEX_EXTRA) { return; }
                    Node state = new Node(beat.second, distance_from_start);
                    state.limbs[foot] = new Limb();
                    state.limbs[foot][_0] = new Part(beat, a);
                    state.sanityCheck();
                    result.Add(state);
                });
            });
        }
Example #5
0
        public static void Calculate2 (List<Node> result, Beat beat, int distance_from_start, Panel a, Panel b) {
            if (!Panel.IsBracketable(a.index, b.index)) { return; }
            bool is_force_tap = beat.hasTapTypeOrNoneOnly(TapType.Force);

            Iterate.Foot1((foot) => {
                Iterate.Part2(foot, a.index, b.index, (_0, _1) => {
                    if (is_force_tap && (_0 == Limb.INDEX_EXTRA || _1 == Limb.INDEX_EXTRA)) {
                        return;
                    }
                    Node state = new Node(beat.second, distance_from_start);

                    state.limbs[foot] = new Limb();
                    state.limbs[foot][_0] = new Part(beat, a);
                    state.limbs[foot][_1] = new Part(beat, b);
                    state.sanityCheck();
                    result.Add(state);
                });
            });
        }
Example #6
0
        public static void Calculate11 (List<Node> result, Beat beat, int distance_from_start, Panel a, Panel b) {
            bool is_force_tap = beat.hasTapTypeOrNoneOnly(TapType.Force);

            Iterate.Foot2((foot_a, foot_b) => {
                Iterate.Part1(foot_a, (a_0) => {
                    Iterate.Part1(foot_b, (b_0) => {
                        if (is_force_tap && (a_0 == Limb.INDEX_EXTRA || b_0 == Limb.INDEX_EXTRA)) {
                            return;
                        }
                        Node state = new Node(beat.second, distance_from_start);

                        state.limbs[foot_a] = new Limb();
                        state.limbs[foot_a][a_0] = new Part(beat, a);
                        state.limbs[foot_b] = new Limb();
                        state.limbs[foot_b][b_0] = new Part(beat, b);
                        state.sanityCheck();
                        result.Add(state);
                    });
                });
            });
        }
Example #7
0
        public static void Calculate33 (List<Node> result, Beat beat, int distance_from_start, Panel a, Panel b, Panel c, Panel d, Panel e, Panel f) {
            if (!Panel.IsBracketable(a.index, b.index, c.index) || !Panel.IsBracketable(d.index, e.index, f.index)) { return; }
            Panel front_a = LimbHelper.GetFrontPanel(a, b, c);
            Panel back_a = LimbHelper.GetBackPanel(a, b, c);
            Panel center_a = LimbHelper.GetCenterPanel(a, b, c);

            Panel front_b = LimbHelper.GetFrontPanel(d, e, f);
            Panel back_b = LimbHelper.GetBackPanel(d, e, f);
            Panel center_b = LimbHelper.GetCenterPanel(d, e, f);

            Iterate.Foot2((foot_a, foot_b) => {
                bool face_front = (back_a.index < back_b.index);
                if (foot_a == Node.INDEX_RIGHT_FOOT) { face_front = !face_front; }

                Node state = new Node(beat.second, distance_from_start);
                state.limbs[foot_a] = new Limb();
                LimbHelper.Do3Bracket(state, foot_a, face_front, beat, front_a, back_a, center_a);
                state.limbs[foot_b] = new Limb();
                LimbHelper.Do3Bracket(state, foot_b, face_front, beat, front_b, back_b, center_b);
                state.sanityCheck();
                result.Add(state);
            });
        }