Question: Create a program that loads a maze file and prints 1.the maze and 2.the maze with the shortest solution. The maze will be taken from

Create a program that loads a maze file and prints 1.the maze and 2.the maze with the shortest solution. The maze will be taken from a file maze.txt which will look something like this:

maze.txt

XXXXXXXXXXXXXXXXXXXXXXXXXXXX XS XXX X X X X XXXXXXXXXXXXXX X X XXX X X FX XXXXXXXXXXXXXXXXXXXXXXXXXXXX

The program should load the maze.txt into a graphical representaion of a maze then find the shortest path by first checking up, down, left, then right. If there is a solution, the program will output the maze with the path filled with a dot (.). If there is no solution, simply output No solution. Program should print out the initial maze first.

It is important to note that the program must be executable in the terminal by typing:

javac Maze.java

java Maze mazeFile

Create a program that loads a maze file and prints 1.the maze

maze - Notepad File Edit Format View Help XS XXX FX 11/25/2017

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!