Exemple #1
0
 public AStar(Waypoint startLocation, Waypoint endLocation, NextLocations adjacentLocations)
 {
     startNode            = new Node(startLocation, endLocation);
     nodes[startLocation] = startNode;
     endNode                = new Node(endLocation, endLocation);
     nodes[endLocation]     = endNode;
     this.adjacentLocations = adjacentLocations;
 }
Exemple #2
0
 public static List <Waypoint> FindPath(Waypoint startNode, Waypoint endNode, NextLocations nextLocations)
 {
     return(new AStar(startNode, endNode, nextLocations).FindPath());
 }