From 68fd8353e25be592eed7b3179405794aae67c140 Mon Sep 17 00:00:00 2001 From: fdai7920 Date: Thu, 8 Feb 2024 12:39:19 +0100 Subject: [PATCH] fix drawCardError --- src/main/java/de/hsfulda/onses/services/GameService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index 668c177..83a403e 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -55,7 +55,7 @@ public class GameService { } for (int i = 0; i < amount; i++) { Card newCard = game.getDrawCardDeck().getFirst().setFacedown(isFaceDown).setPlayer(player); - player.getPlayerDeck().add(newCard); + player.addCardToPlayerDeck(newCard); game.getDrawCardDeck().removeFirst(); } if (amount == 1 && !player.getPlayerDeck().isEmpty()) { @@ -66,6 +66,7 @@ public class GameService { playCard(drawnCard); } else nextPlayer(); + game.getPlayerService().botMove(); } } if (amount != 1) {