diff --git a/src/ShipWarfareGUI.java b/src/ShipWarfareGUI.java index 07376eb..3dd7458 100644 --- a/src/ShipWarfareGUI.java +++ b/src/ShipWarfareGUI.java @@ -393,7 +393,7 @@ public class ShipWarfareGUI extends Application { } hitCounter++; } else { - + missCounter++; } @@ -621,11 +621,16 @@ public class ShipWarfareGUI extends Application { fightButton.setOnAction(new EventHandler() { @Override public void handle(ActionEvent event) { - chooseFightOrRun.setText("Ohh, Fight ehh?"); + counter++; + chooseFightOrRun.setText("Ohh, Fight ehh?"); try { destroyPeasantShipsOrEscape(); } catch(Exception e){} + if (counter == 2) { + title.setVisible(false); + + } } });