Browse Source

fix drawCardError

main^2
fdai7920 11 months ago
parent
commit
68fd8353e2
  1. 3
      src/main/java/de/hsfulda/onses/services/GameService.java

3
src/main/java/de/hsfulda/onses/services/GameService.java

@ -55,7 +55,7 @@ public class GameService {
} }
for (int i = 0; i < amount; i++) { for (int i = 0; i < amount; i++) {
Card newCard = game.getDrawCardDeck().getFirst().setFacedown(isFaceDown).setPlayer(player); Card newCard = game.getDrawCardDeck().getFirst().setFacedown(isFaceDown).setPlayer(player);
player.getPlayerDeck().add(newCard);
player.addCardToPlayerDeck(newCard);
game.getDrawCardDeck().removeFirst(); game.getDrawCardDeck().removeFirst();
} }
if (amount == 1 && !player.getPlayerDeck().isEmpty()) { if (amount == 1 && !player.getPlayerDeck().isEmpty()) {
@ -66,6 +66,7 @@ public class GameService {
playCard(drawnCard); playCard(drawnCard);
} }
else nextPlayer(); else nextPlayer();
game.getPlayerService().botMove();
} }
} }
if (amount != 1) { if (amount != 1) {

Loading…
Cancel
Save