Romania problem with A* Algorithm code in Java