From feebc4cf858e3e4023faf3bcad430531100a8341 Mon Sep 17 00:00:00 2001 From: fdai7736 Date: Wed, 7 Feb 2024 16:00:27 +0100 Subject: [PATCH] refactoring: use last played card for init --- src/main/java/de/hsfulda/onses/controllers/GameController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/hsfulda/onses/controllers/GameController.java b/src/main/java/de/hsfulda/onses/controllers/GameController.java index 8d3a550..11ae0ae 100644 --- a/src/main/java/de/hsfulda/onses/controllers/GameController.java +++ b/src/main/java/de/hsfulda/onses/controllers/GameController.java @@ -27,7 +27,7 @@ public class GameController implements Controller { final Pane playerPane = (Pane) parent.lookup("#playerPane"); final Button playButton = (Button) parent.lookup("#playCardBtn"); - CardController lastPlayedCardController = new CardController(new Card().setValue(Card.Value.FIVE).setColor(Card.Color.BLUE)); + CardController lastPlayedCardController = new CardController(game.getLastPlayedCard()); PlayerController playerController = new PlayerController(gameService.getGame().getPlayerService().getPlayerList().getFirst()); PlayerController enemyController = new PlayerController(gameService.getGame().getPlayerService().getPlayerList().getLast());