Browse Source

refactoring: nextPlayer

main
fdai7906 11 months ago
parent
commit
a8c26a1d61
  1. 7
      src/main/java/de/hsfulda/onses/services/GameService.java

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

@ -20,6 +20,9 @@ public class GameService {
return game; return game;
} }
public void nextPlayer() {
game.getPlayerService().nextTurn();
}
public void playCard(Player player, Card card) public void playCard(Player player, Card card)
{ {
// add lastPlayedCard back to drawCardDeck // add lastPlayedCard back to drawCardDeck
@ -27,8 +30,8 @@ public class GameService {
// check for special rules (draw, colorchoose, skip,...) // check for special rules (draw, colorchoose, skip,...)
// Skip // Skip
if (card.getValue() == Card.Value.SKIP) { if (card.getValue() == Card.Value.SKIP) {
game.getPlayerService().nextTurn();
game.getPlayerService().nextTurn();
nextPlayer();
nextPlayer();
} }
} }

Loading…
Cancel
Save