Maze solver written in Java