From f6df79c2258c1619636e331893ea2a7c570a5544 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Wed, 7 Feb 2024 16:44:19 +0100 Subject: [PATCH] add Player CurrentCard --- src/main/java/de/hsfulda/onses/models/Player.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/models/Player.java b/src/main/java/de/hsfulda/onses/models/Player.java index 2530bdd..695e3d4 100644 --- a/src/main/java/de/hsfulda/onses/models/Player.java +++ b/src/main/java/de/hsfulda/onses/models/Player.java @@ -14,6 +14,7 @@ public class Player { private Game game; private String playerName; private boolean enemy; + private Card currentCard; private final ArrayList playerDeck = new ArrayList<>(); public ArrayList getPlayerDeck() { @@ -62,6 +63,15 @@ public class Player { return this; } + public Card getCurrentCard() { + return currentCard; + } + + public Player setCurrentCard(Card currentCard) { + this.currentCard = currentCard; + return this; + } + public PropertyChangeSupport listeners() { if(this.listeners == null) { this.listeners = new PropertyChangeSupport(this);