Fixed up problem where you don't get cash from ships.
This commit is contained in:
@@ -167,6 +167,7 @@ public class ShipWarfareGUI extends Player {
|
|||||||
fightButton.setVisible(false);
|
fightButton.setVisible(false);
|
||||||
runButton.setVisible(false);
|
runButton.setVisible(false);
|
||||||
continueButton.setDefaultButton(true);
|
continueButton.setDefaultButton(true);
|
||||||
|
setPlayer(logic.getPlayer());
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
@@ -174,6 +175,7 @@ public class ShipWarfareGUI extends Player {
|
|||||||
GameEndGUI gameEndGUI = new GameEndGUI(getPlayer());
|
GameEndGUI gameEndGUI = new GameEndGUI(getPlayer());
|
||||||
gameEndGUI.initializeGameEndGUI(stage);
|
gameEndGUI.initializeGameEndGUI(stage);
|
||||||
stage.show();
|
stage.show();
|
||||||
|
setPlayer(logic.getPlayer());
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else if (commenceFire == 3) {
|
} else if (commenceFire == 3) {
|
||||||
@@ -184,8 +186,10 @@ public class ShipWarfareGUI extends Player {
|
|||||||
fightButton.setVisible(false);
|
fightButton.setVisible(false);
|
||||||
runButton.setVisible(false);
|
runButton.setVisible(false);
|
||||||
continueButton.setDefaultButton(true);
|
continueButton.setDefaultButton(true);
|
||||||
|
setPlayer(logic.getPlayer());
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
setPlayer(logic.getPlayer());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,12 +220,10 @@ public class ShipWarfareGUI extends Player {
|
|||||||
BorderPane encompassingPane = new BorderPane();
|
BorderPane encompassingPane = new BorderPane();
|
||||||
HBox usAgainstEnemyDivisor = new HBox();
|
HBox usAgainstEnemyDivisor = new HBox();
|
||||||
Circle cannon = new Circle();
|
Circle cannon = new Circle();
|
||||||
ShipWarfareGUILogic logic = new ShipWarfareGUILogic(getPlayer());
|
|
||||||
|
|
||||||
|
|
||||||
cannon.setLayoutX(beginningX);
|
cannon.setLayoutX(beginningX);
|
||||||
cannon.setLayoutY(beginningY);
|
cannon.setLayoutY(beginningY);
|
||||||
logic.setNumOfLittyShips(logic.numOfShips());
|
|
||||||
|
|
||||||
this.cannon = cannon;
|
this.cannon = cannon;
|
||||||
|
|
||||||
@@ -229,7 +231,10 @@ public class ShipWarfareGUI extends Player {
|
|||||||
cannon.setVisible(false);
|
cannon.setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
|
ShipWarfareGUILogic logic = new ShipWarfareGUILogic(getPlayer());
|
||||||
|
logic.setNumOfLittyShips(logic.numOfShips());
|
||||||
title.setText(String.format("%d ships from Liu Yuen's Fleet are attacking, Would you like to fight or run?", logic.getNumOfLittyShips()));
|
title.setText(String.format("%d ships from Liu Yuen's Fleet are attacking, Would you like to fight or run?", logic.getNumOfLittyShips()));
|
||||||
|
setPlayer(logic.getPlayer());
|
||||||
|
|
||||||
|
|
||||||
fightButton.setText("Fight");
|
fightButton.setText("Fight");
|
||||||
@@ -408,7 +413,7 @@ public class ShipWarfareGUI extends Player {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
setPlayer(logic.getPlayer());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user