Browse Source

add playCard ChooseDraw

main
fdai7906 11 months ago
parent
commit
4ff22f7830
  1. 10
      src/main/java/de/hsfulda/onses/services/GameService.java

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

@ -46,6 +46,7 @@ public class GameService {
// Abfrage Farbe // Abfrage Farbe
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau Card.Color color = Card.Color.BLUE; //Vorübergehend Blau
game.changeLastPlayedCardColor(color); game.changeLastPlayedCardColor(color);
nextPlayer();
} }
// Draw // Draw
if (card.getValue() == Card.Value.DRAWTWO) { if (card.getValue() == Card.Value.DRAWTWO) {
@ -53,6 +54,15 @@ public class GameService {
drawCard(2); drawCard(2);
nextPlayer(); nextPlayer();
} }
// ChooseDraw
if (card.getValue() == Card.Value.CHOOSEDRAW) {
// Abfrage Farbe
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau
game.changeLastPlayedCardColor(color);
nextPlayer();
drawCard(4);
nextPlayer();
}
} }
public boolean legalMove(Player player, Card card) public boolean legalMove(Player player, Card card)

Loading…
Cancel
Save