From 7f6bdc90220d94742f6c996f3ce588d5f5714c8e Mon Sep 17 00:00:00 2001 From: fdai7920 Date: Wed, 24 Jan 2024 12:31:14 +0100 Subject: [PATCH] add playCard --- src/main/java/de/hsfulda/onses/services/GameService.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index 9e0c6cf..26aa2c2 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -1,6 +1,8 @@ package de.hsfulda.onses.services; +import de.hsfulda.onses.models.Card; import de.hsfulda.onses.models.Game; +import de.hsfulda.onses.models.Player; public class GameService { private final Game game; @@ -11,4 +13,11 @@ public class GameService { this(new Game()); } + public void playCard(Player player, Card card) + { + // add lastPlayedCard back to drawCardDeck + game.setLastPlayedCard(card); + // check for special rules (draw, colorchoose, skip,...) + + } }