Browse Source

refactoring: set player to card by addCard

main^2
fdai7736 11 months ago
parent
commit
d8fe01936a
  1. 1
      src/main/java/de/hsfulda/onses/models/Player.java

1
src/main/java/de/hsfulda/onses/models/Player.java

@ -23,6 +23,7 @@ public class Player {
}
public void addCardToPlayerDeck(Card card) {
card.setPlayer(this);
final ArrayList<Card> oldplayerDeck = new ArrayList<>(this.playerDeck);
playerDeck.add(card);
this.firePropertyChange(PROPERTY_PLAYER_DECK, oldplayerDeck, playerDeck);

Loading…
Cancel
Save