@@ -0,0 +1,1876 @@
+package pathfinder;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.util.Scanner;%0A%0Apublic class Pathfinder %7B%0A%09/*%0A%09 * Driver function for the robot pathfinding program%0A%09 */%0A%09public static void main(String%5B%5D args) throws FileNotFoundException%7B%0A%09%09//Get the filepath from the user%0A%09%09Scanner userInput = new Scanner(System.in);%0A%09%09System.out.print(%22Please enter the filepath: %22);%0A%09%09String filepath = userInput.nextLine();%0A%09%09userInput.close();%0A%09%09%0A%09%09//Check if the file exists and open scanners for functions%0A%09%09File file = new File(filepath);%0A%09%09if(!file.exists() %7C%7C file.isDirectory())%7B%0A%09%09%09System.err.println(%22File Not Found!%22);%0A%09%09%09System.exit(1);%0A%09%09%7D%0A%09%09Scanner mapScanner = new Scanner(file);%0A%09%09Scanner widthScanner = new Scanner(file);%0A%09%09Scanner heightScanner = new Scanner(file);%0A%09%09Scanner traversedScanner = new Scanner(file);%0A%09%09Scanner traversedwScanner = new Scanner(file);%0A%09%09Scanner traversedhScanner = new Scanner(file);%0A%09%09%0A%09%09//Create a blank map and a path map and print out the blank map%0A%09%09Map map = new Map(mapScanner, widthScanner, heightScanner);%0A%09%09Map path = new Map(traversedScanner, traversedwScanner, traversedhScanner);%0A%09%09map.printMap();%0A%09%09%0A%09%09//Find the starting and ending coordinates %0A%09%09//for the robots and create the robot objects%0A%09%09int start1X = map.getStart1X();%0A%09%09int start1Y = map.getStart1Y();%0A%09%09int start2X = map.getStart2X();%0A%09%09int start2Y = map.getStart2Y();%0A%09%09int end1X = map.getEnd1X();%0A%09%09int end1Y = map.getEnd1Y();%0A%09%09int end2X = map.getEnd2X();%0A%09%09int end2Y = map.getEnd2Y();%0A%09%09Robot robot1 = new Robot(start1X, start1Y, end1X, end1Y);%0A%09%09Robot robot2 = new Robot(start2X, start2Y, end2X, end2Y);%0A%09%09%0A%09%09//Run two bfs searches, one for each robot, and mark their paths%0A%09%09bfs bfs = new bfs();%0A%09%09bfs.navigateMapBFS(robot1, map, path, '.');%0A%09%09map.clearV();%0A%09%09bfs bfs2 = new bfs();%0A%09%09bfs2.navigateMapBFS(robot2, map, path, '*');%0A%09%7D%0A%7D%0A

Create Pathfinder.java