forked from External/mage
[Commander] Display Commander in client
This commit is contained in:
parent
930e70fbbb
commit
e6847a472d
3 changed files with 25 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue