diff --git a/src/main/java/de/hsfulda/onses/controllers/GameController.java b/src/main/java/de/hsfulda/onses/controllers/GameController.java index fbf3b66..7ab7151 100644 --- a/src/main/java/de/hsfulda/onses/controllers/GameController.java +++ b/src/main/java/de/hsfulda/onses/controllers/GameController.java @@ -26,6 +26,7 @@ public class GameController implements Controller { final Pane enemyPane = (Pane) parent.lookup("#enemyPane"); final Pane playerPane = (Pane) parent.lookup("#playerPane"); final Button playButton = (Button) parent.lookup("#playCardBtn"); + final Button drawCardButton = (Button) parent.lookup("#drawCardBtn"); CardController lastPlayedCardController = new CardController(game.getLastPlayedCard(), null); PlayerController playerController = new PlayerController(gameService.getGame().getPlayerService().getPlayerList().getFirst()); @@ -50,6 +51,10 @@ public class GameController implements Controller { } }); + drawCardButton.setOnAction(e -> { + gameService.drawCard(1); + }); + lastPlayedCardPane.getChildren().add(lastPlayedCardController.render()); playerPane.getChildren().add(playerController.render()); diff --git a/src/main/resources/de/hsfulda/onses/views/game.fxml b/src/main/resources/de/hsfulda/onses/views/game.fxml index e0e8f23..892ce90 100644 --- a/src/main/resources/de/hsfulda/onses/views/game.fxml +++ b/src/main/resources/de/hsfulda/onses/views/game.fxml @@ -36,7 +36,7 @@ -