11 13
7 10
XXXXXXXXXXXXX
X JX AX X X
XXXX XXXXBX XX
X X SX X X X
X XXXX XXX XXX
X X X
X XXXXXXXXX XX
X X X X
XXXXXX XXXX XX
XL X
XXXXXXXDXXXXX

I would like to create a recursive function to recurse through this input. the X's are the walls and the D is the door, the function should trace through the input and see if the characters can escape from the maze, they are labeled by there initials. Any hints or starts would be greatly appreciated. thanks the numbers at the top are the size of the maze and then the location of the door as well. Note I can't get the input to post right there should be a line of x's on the right side and most of the characters should be able to escape.

Member Avatar for iamthwee

Google maze solving algorithms, Tremaux's algo look good but I've never used it.

It shouldn't be that hard to use as you maze it fairly simple.

Here's another (potentially) useful link.

http://www.cs.bu.edu/teaching/alg/maze/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.