Browse Source

add playCard Draw

main
fdai7906 11 months ago
parent
commit
8e60e5ff9e
  1. 9
      src/main/java/de/hsfulda/onses/services/GameService.java

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

@ -22,6 +22,9 @@ public class GameService {
public void nextPlayer() {
game.getPlayerService().nextTurn();
}
public void drawCard(int amount) {
}
public void playCard(Player player, Card card)
{
@ -44,6 +47,12 @@ public class GameService {
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau
game.changeLastPlayedCardColor(color);
}
// Draw
if (card.getValue() == Card.Value.DRAWTWO) {
nextPlayer();
drawCard(2);
nextPlayer();
}
}
public boolean legalMove(Player player, Card card)

Loading…
Cancel
Save