Hello people!
How can a solve a maze in C using dfs and stack, I have a .txt file with
Code:
5 10
##########
# i m #
##### ###
#m m # m #
#s########
I already read the matrix and store it.
The instructions are: 'i' is the start point
'm' are coins that I need count
'#' are closed way(wall)
'.' are free path
and 's' exit.
I need find a route of 'i' to 's' if I take a wrong way I need return and search a new path when I find 's' I need to print the cordinates route and the coins in the right way.
Anyone can help me make this task using dfs with stack, I already store the labyrinth, i would like to know how to call dfs function, and how to make it.
ps. If You don't understand my english, ask me.
I am Brazilian.
Thank you.