This commit is contained in:
BetaSteward 2010-04-11 20:28:38 +00:00
parent d151f99f4f
commit e1190077a2
11 changed files with 167 additions and 23 deletions

View file

@ -31,7 +31,7 @@ package mage.view;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.game.GameState;
import mage.counters.Counter;
import mage.game.permanent.Permanent;
/**
@ -46,6 +46,7 @@ public class PermanentView extends CardView {
private boolean faceUp;
private int damage;
private List<UUID> attachments;
private List<CounterView> counters;
public PermanentView(Permanent permanent) {
super(permanent);
@ -58,6 +59,12 @@ public class PermanentView extends CardView {
attachments = new ArrayList<UUID>();
attachments.addAll(permanent.getAttachments());
}
if (permanent.getCounters().size() > 0) {
counters = new ArrayList<CounterView>();
for (Counter counter: permanent.getCounters().values()) {
counters.add(new CounterView(counter));
}
}
}
public boolean isTapped() {
@ -83,4 +90,8 @@ public class PermanentView extends CardView {
public List<UUID> getAttachments() {
return attachments;
}
public List<CounterView> getCounters() {
return counters;
}
}