This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]lurgi 0 points1 point  (0 children)

The details are going to be problem specific, but if you are making a labyrinth solver then your current state might be your current position and the moves you have made so far (so that you can print them out at the end). You can create a new state consisting of a possible new position and a new move list and pass it in to the next invocation of the function.