Exemple #1
0
        public IEnumerable <ISolutionTreeNode> Solve(Compiled.Goal [] goalDefs)
        {
            solution = null;

            if (Start != null)
            {
                Start();
            }

            var engine = new EngineInternals();

            foreach (var @event in engine.Solve(goalDefs))
            {
                @event.Accept(this);

                if (solution != null)
                {
                    yield return(solution.Tree);

                    solution = null;
                }
            }
        }
Exemple #2
0
        public IEnumerable <ISolutionTreeNode> Solve (Compiled.Goal [] goalDefs)
        {
            solution = null;

            if (Start != null)
            {
                Start ();
            }

            var engine = new EngineInternals ();

            foreach (var @event in engine.Solve (goalDefs))
            {
                @event.Accept (this);

                if (solution != null)
                {
                    yield return solution.Tree;

                    solution = null;
                }
            }
        }