Question: It is a 12X12 character array containing '0' (at places you can go) or '1' at places where you can't. You may assume that there

 It is a 12X12 character array containing '0' (at places youcan go) or '1' at places where you can't. You may assume

It is a 12X12 character array containing '0' (at places you can go) or '1' at places where you can't. You may assume that there is exactly one entrance and at least 1 exit to the maze (You Can give maximum 3 exits and minimum 1 exit). Create a Maze by random with 0's and 1's and give it exactly one entrance and at-least one exit (maximum: 3), the entry and exit points should be generated by random as well. As you can see, the generated maze has no possible exit. You have to programmatically determine this by traversing it. And you have to recreate the maze as many times as it takes to generate a solvable maze. This Program should have three possible outputs, Case 1: Maze exited successfully upon traversal. Case 2: Arrived back at the starting entry location upon traversal. Case 3: Generated maze has no possible exit. Use Recursion concept to solve the Maze. Create an enumerated data type Direction for all possible directions enemy Direction { DOWN, RIGHT, UP, LEFT} Refer HW 4 for random number/char generation. Create functions for Maze Generation, Maze Traversal, Printing Maze, Valid Move Check and Edge Check. In a 2D array, Traversal can be done like this. Current Position: (x, y) Down: (x+1, y) Right: (x, y + 1) Up: (x-1, y) Left: (x, y - 1]

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!