[Commander] Display Commander in client

This commit is contained in:
Plopman 2013-07-17 20:35:52 +02:00
parent 930e70fbbb
commit e6847a472d
3 changed files with 25 additions and 11 deletions

View file

@ -28,13 +28,12 @@
package mage.client.util;
import java.util.List;
import mage.cards.Card;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.view.*;
import java.util.List;
/**
*
* @author BetaSteward_at_googlemail.com
@ -55,12 +54,17 @@ public class CardsViewUtil {
return cards;
}
public static CardsView convertEmblems(List<EmblemView> view) {
public static CardsView convertCommandObject(List<CommandObjectView> view) {
CardsView cards = new CardsView();
for (EmblemView emblem : view) {
CardView cardView = new CardView(emblem);
cards.put(emblem.getId(), cardView);
for (CommandObjectView commandObject : view) {
if(commandObject instanceof EmblemView ){
CardView cardView = new CardView((EmblemView)commandObject);
cards.put(commandObject.getId(), cardView);
}
else if(commandObject instanceof CommanderView ){
cards.put(commandObject.getId(),(CommanderView)commandObject);
}
}
return cards;