From cf6f5207a41b7baabf79c4679d7d1d7cac982653 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Wed, 31 Jan 2024 14:23:10 +0100 Subject: [PATCH] add legalMove-SameValue --- src/main/java/de/hsfulda/onses/services/GameService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index bdee4d5..1cac834 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -31,6 +31,8 @@ public class GameService { // rules: if (card.getColor() == lastCard.getColor()) legalMoveFound = true; // same color + if (card.getValue() == lastCard.getValue()) legalMoveFound = true; // same value + return legalMoveFound; }