Implemented banding (#41)

This commit is contained in:
L_J 2018-02-13 20:36:25 +01:00 committed by GitHub
parent adec5cf88b
commit e7301e2c08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 708 additions and 136 deletions

View file

@ -113,6 +113,7 @@ public class CardView extends SimpleCardView {
protected List<UUID> targets;
protected UUID pairedCard;
protected List<UUID> bandedCards;
protected boolean paid;
protected List<CounterView> counters;
@ -202,6 +203,7 @@ public class CardView extends SimpleCardView {
this.targets = null;
this.pairedCard = cardView.pairedCard;
this.bandedCards = null;
this.paid = cardView.paid;
this.counters = null;
@ -353,6 +355,10 @@ public class CardView extends SimpleCardView {
if (permanent.getCounters(game) != null && !permanent.getCounters(game).isEmpty()) {
this.loyalty = Integer.toString(permanent.getCounters(game).getCount(CounterType.LOYALTY));
this.pairedCard = permanent.getPairedCard() != null ? permanent.getPairedCard().getSourceId() : null;
this.bandedCards = new ArrayList<>();
for (UUID bandedCard : permanent.getBandedCards()) {
bandedCards.add(bandedCard);
}
counters = new ArrayList<>();
for (Counter counter : permanent.getCounters(game).values()) {
counters.add(new CounterView(counter));
@ -885,6 +891,10 @@ public class CardView extends SimpleCardView {
return pairedCard;
}
public List<UUID> getBandedCards() {
return bandedCards;
}
public int getType() {
return type;
}