Commits

Vincent Fiack committed 456065b

oops, wrong order

  • Participants
  • Parent commits 34809b5

Comments (0)

Files changed (1)

File src/main/java/org/aichallenge/pathfinding/AStar.java

 	
 	public Path findPartialPath(Field field, Cell from, Cell destination, boolean ignoreEnemies, int pathLimit, long timeLimit) {
 		int owner = field.get(from).owner;
-		return findPartialPath(field, from, owner, destination, ignoreEnemies, 0, pathLimit, timeLimit);
+		int proximityNeeded = 0;
+		
+		return findPartialPath(field, from, owner, destination, ignoreEnemies, pathLimit, proximityNeeded, timeLimit);
 	}
 	
 	public Path findPartialPath(Field field, Cell from, int owner, Cell destination, boolean ignoreEnemies, int pathLimit, int proximityNeeded, long timeLimit) {
 
 			int distance = field.getDistance(current, destination);
 
-			//we are close enougth,  rebuild the path
+			//we are close enough, rebuild the path
 			if(distance <= proximityNeeded)
 				return buildPath(field, cameFrom, current);