Question
MAZE Project Write a Maze class with the following requirements: Takes any two-dimensional array that represents a maze: 0s (zeros) for the walls, and 1s
MAZE Project Write a Maze class with the following requirements: Takes any two-dimensional array that represents a maze: 0s (zeros) for the walls, and 1s for the available paths. A zip file has been uploaded to the project folder for you to complete. There will be only one constructor that takes a two-dimensional array A method named displayMaze should print the maze (bird-view) that shows the walls and the available paths, A method named displayPath should print the maze (bird-view) that shows the walls and the available paths,and the route for the solution until the current location (for example the location of the mouse and the path it took from start point to current location A method named takeStep that takes one step each time when it is called and displays the maze again A method named findExit runs and finds the solution all the way to the exit and displays the maze showing the suggested path Assume that entry point of the maze is always the last row and the first column and the first move direction will be to the north. Therefore, with the constructor, set the location and direction properly. Ignore checking exit for the first 3 steps. Test program is given for your testing The program should work with any Maze including different size of maze. Sample display of the maze Sample output after taking some steps. ~ represents the path towards solution, @ represents a mouse
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started