ShipWarfare fight button coming along nicely
This commit is contained in:
@@ -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) {
|
||||||
chooseFightOrRun.setText("Ohh, Fight ehh?");
|
counter++;
|
||||||
|
chooseFightOrRun.setText("Ohh, Fight ehh?");
|
||||||
try {
|
try {
|
||||||
destroyPeasantShipsOrEscape();
|
destroyPeasantShipsOrEscape();
|
||||||
}
|
}
|
||||||
catch(Exception e){}
|
catch(Exception e){}
|
||||||
|
if (counter == 2) {
|
||||||
|
title.setVisible(false);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user