Someone
public text v1 · immutableMark the current cell as 'Visited';
If the current cell has any neighbours which have not been visited
{
Choose one of the unvisited neighbours;
Push the current cell on the stack;
Knock down the wall between the current
cell and the chosen cell;
Make the chosen cell the current cell;
Recursively call this function;
}
else
{
Pop the last current cell off the stack;
Backtrack to the previous execution of this function;
}