|
|
@ -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()); |
|
|
|