From fa81f24f0e42a87c9bdf3cba049743074d0f4681 Mon Sep 17 00:00:00 2001 From: fdai7793 Date: Wed, 7 Feb 2024 16:42:26 +0100 Subject: [PATCH] implement FaceDown to Game.java --- src/main/java/de/hsfulda/onses/models/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/hsfulda/onses/models/Game.java b/src/main/java/de/hsfulda/onses/models/Game.java index 4683237..6a9c67a 100644 --- a/src/main/java/de/hsfulda/onses/models/Game.java +++ b/src/main/java/de/hsfulda/onses/models/Game.java @@ -31,7 +31,7 @@ public class Game { } public Game setLastPlayedCard(Card lastPlayedCard) { final Card oldLastPlayedCard = this.lastPlayedCard; - this.lastPlayedCard = lastPlayedCard; + this.lastPlayedCard = lastPlayedCard.setFacedown(false); this.firePropertyChange(PROPERTY_LAST_PLAYED_CARD, oldLastPlayedCard, lastPlayedCard); return this; } @@ -42,7 +42,7 @@ public class Game { public void addCardToDrawCardDeck(Card card) { final ArrayList oldCards = new ArrayList<>(this.drawCardDeck); - drawCardDeck.add(card); + drawCardDeck.add(card.setFacedown(true)); this.firePropertyChange(PROPERTY_DRAW_CARD_DECK, oldCards, drawCardDeck); }