update the maze simulator with click function