예제 #1
0
 public static void CreateDiagrams(TestContext ctx)
 {
     template = new AiStateTemplate();
     template.endNodes.Add("0");
     template.transitions["0"] = new Dictionary <int, string>();
     template.nodes.Add("0", new Accumulator("0", template.transitions["0"]));
     state_1 = new AiState(template, "0");
     state_2 = new AiState(template, "0");
 }
예제 #2
0
        public static void CreateDiagrams(TestContext ctx)
        {
            template = new AiStateTemplate();
            Dictionary <int, string> zero_transitions = new Dictionary <int, string>();

            zero_transitions.Add((int)DefaultOrderResults.SUCCESS, "1");
            template.nodes["0"] = new Accumulator("0", zero_transitions);
            Dictionary <int, string> one_transitions = new Dictionary <int, string>();

            one_transitions.Add((int)DefaultOrderResults.SUCCESS, "1");
            one_transitions.Add((int)DefaultOrderResults.FAILURE, "0");
            template.nodes["1"] = new AccumulatorChecker("1", one_transitions, "0", 10, AccumulatorChecker.CHECKER_MODE.EQUALS);

            state_1 = new AiState(template, "0");
            state_2 = new AiState(template, "0");
        }