Exemplo n.º 1
0
 public Runner(List <IFact <T> > facts, FactFinder factFinder, PathFinder pathFinder, PathRunner pathRunner)
 {
     Facts      = facts;
     FactFinder = factFinder;
     Pathfinder = pathFinder;
     PathRunner = pathRunner;
 }
Exemplo n.º 2
0
        public Task <T> RunShortestPath(T initialState, string from, string to)
        {
            var path = GetShortestPath(from, to);

            if (path == null)
            {
                throw new ArgumentException("There is no path from " + from + " to " + to, "to");
            }

            return(PathRunner.Run(initialState, path));
        }