Completed search()-method in Maze class