From 4ff22f7830e20dcc4f5315d981be762eb2259f13 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Fri, 2 Feb 2024 17:21:14 +0100 Subject: [PATCH] add playCard ChooseDraw --- .../java/de/hsfulda/onses/services/GameService.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index bca18b9..92293de 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -46,6 +46,7 @@ public class GameService { // Abfrage Farbe Card.Color color = Card.Color.BLUE; //Vorübergehend Blau game.changeLastPlayedCardColor(color); + nextPlayer(); } // Draw if (card.getValue() == Card.Value.DRAWTWO) { @@ -53,6 +54,15 @@ public class GameService { drawCard(2); 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)