Exemplo n.º 1
0
  private void displaySaveGameMenu() {
    this.console.println("\n\nEnter the file path for the file where the game is to be saved.");
    String filePath = this.getInput();

    try {
      // save the game to the specified file
      GameControl.saveGame(TheGreatEscape.getCurrentGame(), filePath);
    } catch (Exception ex) {
      ErrorView.display("MainMenuView", ex.getMessage());
    }
  }
Exemplo n.º 2
0
  private void startExistingGame() {
    this.console.println("\n\nEnter the file path for the file where the game is saved.");
    String filePath = this.getInput();

    try {
      // start a saved game
      GameControl.getSavedGame(filePath);
    } catch (Exception ex) {
      ErrorView.display("MainMenuView", ex.getMessage());
    }

    GameMenuView gameMenu = new GameMenuView();
    gameMenu.display();
  }
Exemplo n.º 3
0
 private void startNewGame() {
   // create new game
   GameControl.createNewGame(TheGreatEscape.getPlayer());
 }