diff --git a/src/main/java/de/hsfulda/onses/controllers/AppController.java b/src/main/java/de/hsfulda/onses/controllers/AppController.java index d1eb5b4..14d8c1c 100644 --- a/src/main/java/de/hsfulda/onses/controllers/AppController.java +++ b/src/main/java/de/hsfulda/onses/controllers/AppController.java @@ -28,7 +28,13 @@ public class AppController implements Controller { final Parent parent = FXMLLoader.load(Objects.requireNonNull(Main.class.getResource("views/app.fxml"))); Button button = (Button) parent.lookup("#startGameBtn"); - + button.setOnAction(e -> { + try { + stage.setScene(new Scene(gameController.render())); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + }); return parent; } }