Traverse a maze recursively. Yourprogram MUST read from a file called"maze.dat".
A sample (Links to an external site.)maze hasbeen provided. The actual maze will belarger. The start and end of the maze are represented withthecharacters + and -, respectively. The first line ofthe maze file will be the numberof rows and columns, respectively.
As your program moves through the maze the current pathshouldalso be marked with the + character. Any path leadingtoa dead end should be marked with the . character.
Upon reaching the end of the maze your program should printamessage to the screen stating that the maze was solved.If your program does not find the exit this should also bestated.All messages, and a print out of the solution, if one isfound,should be to the screen.
Here is the actual maze (Links to an externalsite.)file that will be used to testyour programs.
Traverse a maze recursively. Your program MUST read from a file called "maze.dat". A sample (Links to an external site.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am