Java-Adventure-Game / Java-Based Adventure Game main / AdventureGameApp.java
AdventureGameApp.java
Raw
import AdventureGameModel.AdventureGame;
import javafx.application.Application;
import javafx.stage.Stage;
import AdventureGameViews.AdventureGameView;

import java.io.IOException;

/**
 * Class AdventureGameApp. Runs entire application
 */
public class AdventureGameApp extends  Application {

    AdventureGame model;
    AdventureGameView view;

    public static void main(String[] args) {
        launch(args);
    }

    // to start the game, we need to call "launch", which will in turn call "start"
    @Override
    public void start(Stage primaryStage) throws IOException {
        this.model = new AdventureGame("TinyGame"); // we are playing TinyGame in this project
        this.view = new AdventureGameView(model, primaryStage);
    }
}