예제 #1
0
 public static void precomputeWaypoints(MapLocation start) {
   if (!Pathfinder.isStarted()) Pathfinder.startComputation(start);
   else if (!Pathfinder.isDone()) Pathfinder.continueComputation();
 }
예제 #2
0
 public static MapLocation[] findWaypoints(MapLocation start, MapLocation target) {
   if (!Pathfinder.isStarted()) Pathfinder.startComputation(start);
   else if (!Pathfinder.isDone()) Pathfinder.continueComputation();
   else return Pathfinder.findWaypoints(target);
   return null;
 }