Merge branch 'Lab_4' into Lab_5

This commit is contained in:
ZakenChannel 2024-04-23 14:05:18 +04:00
commit 6010e121cb

View File

@ -156,7 +156,7 @@ public class FormWarPlaneCollection extends Application implements Initializable
@FXML @FXML
private void buttonGoToFormWithDeleteObject(ActionEvent event){ private void buttonGoToFormWithDeleteObject(ActionEvent event){
if (!removedPlanesStack.isEmpty()) { if (!removedPlanesStack.isEmpty()) {
goToFormAirFighter(removedPlanesStack.get(new Random().nextInt(0, removedPlanesStack.size()))); goToFormAirFighter(removedPlanesStack.pop());
} else { } else {
showAlert("Стек удаленных объектов пуст."); showAlert("Стек удаленных объектов пуст.");
} }