23
« Last post by Jeod on November 29, 2010, 02:38:13 PM »
For my computer science class, my final exam is a pretty difficult program (for my level of C experience anyway)
Solve the following 20x10 maze using an algorithm:
####################
## # ## ### #
## # ### # #
# # # ##### #######
# ## # ## # ##
# ## #### ## #### ##
# ## ## #### E
# ## #### ## #### ##
# #### ##
#S##################
The maze will be preset and not brought in as input. The solver should start as S and try to find a way to E. The program should mark the path it is
taking and also mark the paths that were incorrect.
Symbols:
# - Indicates a wall
' ' - Whitespaces, indicate paths
S - Indicates start position
E - Indicates end position
o - Indicates solver
+ - Indicates incorrect path
The program should redraw the maze each time the solver takes a new step. In the solution, show a clean maze with a solution path that the solver found. The program should have a main() function and at least one other function. You must also use arrays to store the maze. The masze must be solved in an algorithm. Do not simply hardcode print statements. Use pointers for moving around the maze. Do not use subscription or indexing techniques.
I've come to a point where I have to ask for assistance. I have no clue how to program this.