From 73eb148e5a0fc212d06ef6c9a6bc2138fdbce7c0 Mon Sep 17 00:00:00 2001 From: fdai7736 Date: Thu, 8 Feb 2024 12:11:08 +0100 Subject: [PATCH] refactoring: add player to card --- src/main/java/de/hsfulda/onses/models/Card.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/models/Card.java b/src/main/java/de/hsfulda/onses/models/Card.java index 568851f..ab2a1a9 100644 --- a/src/main/java/de/hsfulda/onses/models/Card.java +++ b/src/main/java/de/hsfulda/onses/models/Card.java @@ -16,6 +16,8 @@ public class Card { private boolean facedown = false; private boolean selected; + private Player player; + public enum Color { RED, BLUE, GREEN, YELLOW, BLACK; }; @@ -65,6 +67,15 @@ public class Card { return this; } + public Player getPlayer() { + return player; + } + + public Card setPlayer(Player player) { + this.player = player; + return this; + } + public PropertyChangeSupport listeners() { if(this.listeners == null) { this.listeners = new PropertyChangeSupport(this);