Need help writing this program in C, not c++. Implement a game of finding a path
ID: 3611078 • Letter: N
Question
Need help writing this program in C, not c++.Implement a game of finding a path in a maze. The maze isconstructed by a 10*10 matrix with value 0 or 1. 0 indicates a wallwhich you can not cross. 1 indicates a way. The upper-left of thematrix is the entrance (E) and the lower-right is the exit (X).Atany location in the maze, at most FOUR directions are allowed: up,down, left and right. You can NOT travel diagonally.
The input is a file called maze.dat which contains a matrix, forexample:
E111111000
0010001000
0110111000
0100000000
0100011110
0111010010
0101010010
0101110110
0100000100
011000011X
The output should be a file called solution.dat. Each value on thepath of your solution is replaced by a character star (*) forexample:
E**1111000
00*0001000
0**0111000
0*00000000
0*000****0
0***0*00*0
010*0*00*0
010***0**0
0100000*00
0110000**X
the two example files are attached.
We are NOT required to find the optimal solution. You need toconsider the situation that a circle path may exist in themaze.
I dont know if its against the rules, but i can also send somemoney to the person's paypal if they can help me outhere.
Implement a game of finding a path in a maze. The maze isconstructed by a 10*10 matrix with value 0 or 1. 0 indicates a wallwhich you can not cross. 1 indicates a way. The upper-left of thematrix is the entrance (E) and the lower-right is the exit (X).Atany location in the maze, at most FOUR directions are allowed: up,down, left and right. You can NOT travel diagonally.
The input is a file called maze.dat which contains a matrix, forexample:
E111111000
0010001000
0110111000
0100000000
0100011110
0111010010
0101010010
0101110110
0100000100
011000011X
The output should be a file called solution.dat. Each value on thepath of your solution is replaced by a character star (*) forexample:
E**1111000
00*0001000
0**0111000
0*00000000
0*000****0
0***0*00*0
010*0*00*0
010***0**0
0100000*00
0110000**X
the two example files are attached.
We are NOT required to find the optimal solution. You need toconsider the situation that a circle path may exist in themaze.
I dont know if its against the rules, but i can also send somemoney to the person's paypal if they can help me outhere.
Explanation / Answer
Need help writing this program in C, not c++. Implement a game of finding a path
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.