Fixed the Game End screen into Taipan Shop

This commit is contained in:
2019-03-10 23:00:25 -06:00
parent 414a9634b5
commit 91bb72351e
3 changed files with 213 additions and 25 deletions

View File

@@ -65,10 +65,11 @@ public class TaipanShopGUI {
/**
* This method is evoked if the user is eligible to win, and chooses to end the game (by winning).
*/
public void retire(){
public void retire(Stage stage){
player.setRetire(true);
System.out.println("You win!");
System.exit(0);
GameEndGUI gameEndGUI = new GameEndGUI(player);
gameEndGUI.initializeGameEndGUI(stage);
stage.show();
}
/**
@@ -548,7 +549,7 @@ public class TaipanShopGUI {
retireButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
retire();
retire(stage);
}
});
retireButton.setMnemonicParsing(false);