Before abandoning destroyLittyShipsOrEscape separation
This commit is contained in:
@@ -398,7 +398,7 @@ public class ShipWarfareGUI extends Player {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (checkIfDone != 4) {
|
if (winOrLose(primaryStage)==false) {
|
||||||
report.setVisible(true);
|
report.setVisible(true);
|
||||||
title.setVisible(true);
|
title.setVisible(true);
|
||||||
shipsRemaining.setVisible(true);
|
shipsRemaining.setVisible(true);
|
||||||
@@ -490,7 +490,16 @@ public class ShipWarfareGUI extends Player {
|
|||||||
gunsLeftOrTaken.setVisible(true);
|
gunsLeftOrTaken.setVisible(true);
|
||||||
|
|
||||||
if (!winOrLose(primaryStage)) {
|
if (!winOrLose(primaryStage)) {
|
||||||
usAgainstEnemyDivisor.setVisible(false);
|
usAgainstEnemyDivisor.setVisible(true);
|
||||||
|
shipsRemaining.setVisible(true);
|
||||||
|
gunsLeftOrTaken.setVisible(true);
|
||||||
|
ShipWarfareGUILogic logic = new ShipWarfareGUILogic(getPlayer());
|
||||||
|
logic.setPlayer(getPlayer());
|
||||||
|
System.out.println(logic.getReportMessage());
|
||||||
|
|
||||||
|
shipsRemaining.setText(logic.getShipsRemainingMessage());
|
||||||
|
gunsLeftOrTaken.setText(logic.getGunsLeftOrTakenMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,11 +243,10 @@ public class ShipWarfareGUILogic extends Player {
|
|||||||
this.setGuns(getGuns() - 1);
|
this.setGuns(getGuns() - 1);
|
||||||
gunFrustration = true;
|
gunFrustration = true;
|
||||||
} else {
|
} else {
|
||||||
if (numOfLittyShips > 0) {
|
if (getNumOfLittyShips() > 0) {
|
||||||
int HPTaken = randomValue.nextInt(10);
|
int HPTaken = randomValue.nextInt(10);
|
||||||
this.setHP(getHP() - (HPTaken));
|
this.setHP(getHP() - (HPTaken));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getHP() <= 0) {
|
if (getHP() <= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user