From 13e33c0ebd8598ff4435951fc3953d24a3c41445 Mon Sep 17 00:00:00 2001 From: fdai7736 Date: Tue, 6 Feb 2024 20:22:53 +0100 Subject: [PATCH] add GameController --- .../onses/controllers/GameController.java | 22 +++++++++++++++++++ .../de/hsfulda/onses/views/game.fxml | 8 +++++++ 2 files changed, 30 insertions(+) create mode 100644 src/main/java/de/hsfulda/onses/controllers/GameController.java create mode 100644 src/main/resources/de/hsfulda/onses/views/game.fxml diff --git a/src/main/java/de/hsfulda/onses/controllers/GameController.java b/src/main/java/de/hsfulda/onses/controllers/GameController.java new file mode 100644 index 0000000..4eaf803 --- /dev/null +++ b/src/main/java/de/hsfulda/onses/controllers/GameController.java @@ -0,0 +1,22 @@ +package de.hsfulda.onses.controllers; + +import de.hsfulda.onses.Main; +import de.hsfulda.onses.models.Game; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; + +import java.io.IOException; +import java.util.Objects; + +public class GameController implements Controller { + private final Game game; + public GameController(Game game) { + this.game = game; + } + @Override + public Parent render() throws IOException { + final Parent parent = FXMLLoader.load(Objects.requireNonNull(Main.class.getResource("views/game.fxml"))); + + return parent; + } +} diff --git a/src/main/resources/de/hsfulda/onses/views/game.fxml b/src/main/resources/de/hsfulda/onses/views/game.fxml new file mode 100644 index 0000000..b5d96c0 --- /dev/null +++ b/src/main/resources/de/hsfulda/onses/views/game.fxml @@ -0,0 +1,8 @@ + + + + + + + +