Browse Source

refactoring: move one nextTurn into drawCard

main
fdai7920 11 months ago
parent
commit
620b82e202
  1. 5
      src/main/java/de/hsfulda/onses/services/GameService.java

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

@ -36,6 +36,9 @@ public class GameService {
player.getPlayerDeck().add(game.getDrawCardDeck().getFirst());
game.getDrawCardDeck().removeFirst();
}
if (amount != 1) {
nextPlayer();
}
}
public void playCard(Player player, Card card)
{
@ -63,7 +66,6 @@ public class GameService {
if (card.getValue() == Card.Value.DRAWTWO) {
nextPlayer();
drawCard(2);
nextPlayer();
}
// ChooseDraw
if (card.getValue() == Card.Value.CHOOSEDRAW) {
@ -72,7 +74,6 @@ public class GameService {
game.changeLastPlayedCardColor(color);
nextPlayer();
drawCard(4);
nextPlayer();
}
}

Loading…
Cancel
Save