Пример #1
0
        public static List <T> Search <T>(IUnweightedGraph <T> graph, T start, T goal)
        {
            Dictionary <T, T> cameFrom;
            var foundPath = Search(graph, start, goal, out cameFrom);

            return(foundPath ? AStarPathfinder.RecontructPath(cameFrom, start, goal) : null);
        }
Пример #2
0
 /// <summary>
 /// convenience shortcut for calling AStarPathfinder.search
 /// </summary>
 public List <Point> Search(Point start, Point goal) => AStarPathfinder.Search(this, start, goal);