Maze generator and resolver coded in Java