completed todo MazeGraph.java