Question: Please, I need help. I need to build code using eclipse Java. Write a recursive 2D maze solver. The input to the program will be

Please, I need help. I need to build code using eclipse Java.

Write a recursive 2D maze solver.

The input to the program will be a text file. Your program must read this text file and then write out the solution (if one exists).

For example here is a sample input, the file name of the maze text file will be a command line input to your Java program. Meaning if you were to run your program from the command prompt, you can give it the filename. This is the parameter in the main() method. Research how this works and how can you specify command line parameters in Eclipse so you don't have to exit the Eclipse environment to test your program.

4,4 0000 0111 0000 1110 3,3 0,3

The first 2 numbers give you the dimensions of the maze. In this case it's a 4x4 maze.

You can create a 2D array of integers.

1 Represents a wall

0 Represents an open spot you can more to.

From any given position the legal moves are up, down, left and right, as long as you're not running into a wall or going off the maze.

The last set of 4 numbers are defined like this:

3,3 is the starting location

0,3 is the ending location

So your program should start at location 3,3 marked by S below and find a path to 0,3 marked by E (for End) below.

000E 0111 0000 111S

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!