Skip to content
Snippets Groups Projects
Commit 3ef6fe0e authored by koz01's avatar koz01
Browse files

Ask for dragons after dimension is set.

parent e02fbbaf
No related merge requests found
......@@ -32,13 +32,15 @@ public class App extends Application {
BorderPane root = loader.load();
Scene scene = new Scene(root);
Point2D[][] dragonsInit = getDragonsInit(scene.getWidth(), scene.getHeight());
primaryStage.setScene(scene);
primaryStage.resizableProperty().set(false);
primaryStage.setTitle("Java 1");
primaryStage.show();
primaryStage.hide();
controller = loader.getController();
Point2D[][] dragonsInit = getDragonsInit(scene.getWidth(), scene.getHeight());
primaryStage.show();
controller.startGame(dragonsInit);
//Exit program when main window is closed
primaryStage.setOnCloseRequest(this::exitProgram);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment