added method to adjust the maze according to the solution path