I need help figuring out how to write a program with recursive functions in order to identify the path to a given maze. The maze is read in from a file and then when the path is found the maze is printed with the path shown.
The read in maze will look like this:
000000000000000
011111111011110
010000001000010
011111001111110
010001001000000
011111001000000
000100001111110
000100000001010
000111111101010
010000001001010
010000001001000
011100001011110
000100001010000
0S11111110111F0
000000000000000
S- starting square
F-Finishing square
0-blocked square
1-square you can go through
I understand that I have to use 2D arrays and check all the square until I get to the S square and then check for 1s but I am not sure how to continue finding the 1s to get the path of the maze. Please help!!
Thanks :)