Browse Source

refactoring: add player to card

main^2
fdai7736 11 months ago
parent
commit
73eb148e5a
  1. 11
      src/main/java/de/hsfulda/onses/models/Card.java

11
src/main/java/de/hsfulda/onses/models/Card.java

@ -16,6 +16,8 @@ public class Card {
private boolean facedown = false; private boolean facedown = false;
private boolean selected; private boolean selected;
private Player player;
public enum Color { public enum Color {
RED, BLUE, GREEN, YELLOW, BLACK; RED, BLUE, GREEN, YELLOW, BLACK;
}; };
@ -65,6 +67,15 @@ public class Card {
return this; return this;
} }
public Player getPlayer() {
return player;
}
public Card setPlayer(Player player) {
this.player = player;
return this;
}
public PropertyChangeSupport listeners() { public PropertyChangeSupport listeners() {
if(this.listeners == null) { if(this.listeners == null) {
this.listeners = new PropertyChangeSupport(this); this.listeners = new PropertyChangeSupport(this);

Loading…
Cancel
Save