ShipWarfare fight button coming along nicely

This commit is contained in:
KahootChampion
2019-03-09 23:52:51 -07:00
parent b376ad5284
commit 5f6abbc817

View File

@@ -393,7 +393,7 @@ public class ShipWarfareGUI extends Application {
} }
hitCounter++; hitCounter++;
} else { } else {
missCounter++;
} }
@@ -621,11 +621,16 @@ public class ShipWarfareGUI extends Application {
fightButton.setOnAction(new EventHandler<ActionEvent>() { fightButton.setOnAction(new EventHandler<ActionEvent>() {
@Override @Override
public void handle(ActionEvent event) { public void handle(ActionEvent event) {
counter++;
chooseFightOrRun.setText("Ohh, Fight ehh?"); chooseFightOrRun.setText("Ohh, Fight ehh?");
try { try {
destroyPeasantShipsOrEscape(); destroyPeasantShipsOrEscape();
} }
catch(Exception e){} catch(Exception e){}
if (counter == 2) {
title.setVisible(false);
}
} }
}); });