Browse Source

add GameController

main
fdai7736 11 months ago
parent
commit
13e33c0ebd
  1. 22
      src/main/java/de/hsfulda/onses/controllers/GameController.java
  2. 8
      src/main/resources/de/hsfulda/onses/views/game.fxml

22
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;
}
}

8
src/main/resources/de/hsfulda/onses/views/game.fxml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane prefHeight="690.0" prefWidth="1254.0" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
</AnchorPane>
Loading…
Cancel
Save