From 347434e3e7e3ef2cc303237ae36138ae50821164 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Fri, 2 Feb 2024 16:28:46 +0100 Subject: [PATCH] add playCard skip --- src/main/java/de/hsfulda/onses/services/GameService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index c9acd67..d786a23 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -25,6 +25,11 @@ public class GameService { // add lastPlayedCard back to drawCardDeck game.setLastPlayedCard(card); // check for special rules (draw, colorchoose, skip,...) + // Skip + if (card.getValue() == Card.Value.SKIP) { + game.getPlayerService().nextTurn(); + game.getPlayerService().nextTurn(); + } } public boolean legalMove(Player player, Card card)