Question: Create a class called Maze that includes a recursive call to find a path through a given text maze. The first 2 lines in the
Create a class called "Maze" that includes a recursive call to find a path through a given text maze. The first lines in the text file represent the size of the maze and the the next lines represent the starting location in the maze. A sample text file is attached.
I will test your program on a similar text file. maze.txt Click for more options
I would pick a separate characterletter to represent the path you are taking through the maze. Look for an E first, then if you can't find an E in the spaces around you, look for an O then if there is no O you must be trapped so look for a P if that is what you used to backtrack.
You will first have to set up tp read in the maze text file.
You must dynamically create a dimensional character array.
Write a recursive method to "find your way" through the maze. Each recursive call will represent one move in the maze
Think of the base cases then what would you look for next. This is not a long program, but a logic program.
There is many solutions to this, but make sure what you submit is your own.
Remember to copy your code into a word document and submit that document for a grade.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
