public static BPPhaseDecisionQuery BPPhaseDecisionTree()
        {
            //Decision 3
            var IsPick_2Branch = new BPPhaseDecisionQuery
            {
                Title    = "Is pick_2 phase",
                Test     = (game) => (game.OurTeam.TeamMembers.Count + game.EnemyTeam.TeamMembers.Count < StaticValue.pick_2PhaseCount),
                Positive = new BPPhaseDecisionResult {
                    bPPhase = BPPhase.pick_2
                },
                Negative = new BPPhaseDecisionResult {
                    bPPhase = BPPhase.pick_2
                }
            };


            //Decision 2
            var IsBan_2Branch = new BPPhaseDecisionQuery
            {
                Title    = "Is ban_2 phase",
                Test     = (game) => (game.OurTeam.BanedChampions.Count + game.EnemyTeam.BanedChampions.Count) < StaticValue.ban_2PahseCount,
                Positive = new BPPhaseDecisionResult {
                    bPPhase = BPPhase.ban_2
                },
                Negative = IsPick_2Branch
            };

            //Decision 1
            var IsPick_3Branch = new BPPhaseDecisionQuery
            {
                Title    = "Is pick_3 phase",
                Test     = (game) => (game.OurTeam.TeamMembers.Count + game.EnemyTeam.TeamMembers.Count < StaticValue.pick_3PhaseCount),
                Positive = new BPPhaseDecisionResult {
                    bPPhase = BPPhase.pick_3
                },
                Negative = IsBan_2Branch
            };

            //Decision 0
            var trunk = new BPPhaseDecisionQuery
            {
                Title    = "Is ban_3 phase",
                Test     = (game) => (game.OurTeam.BanedChampions.Count + game.EnemyTeam.BanedChampions.Count) < StaticValue.ban_3PhaseCount,
                Positive = new BPPhaseDecisionResult {
                    bPPhase = BPPhase.ban_3
                },
                Negative = IsPick_3Branch
            };

            return(trunk);
        }
예제 #2
0
        void rotateBPDecision(Game game)
        {
            Rotate      rotate;
            BPPhase     bpPhase;
            Instruction instruction = new Instruction();

            var trunk_rotate = RoatetDecisionQuery.RotateDecisionTree();

            trunk_rotate.Evaluate(game);
            rotate = RotateDecisionResult.Rotate;

            var trunk_bpPhase = BPPhaseDecisionQuery.BPPhaseDecisionTree();

            trunk_bpPhase.Evaluate(game);
            bpPhase = BPPhaseDecisionResult.BPPhase;

            game.BpPhase        = bpPhase;
            instruction.rotate  = rotate;
            instruction.bPPhase = bpPhase;
            game.instruction    = instruction;
        }