示例#1
0
 @Override
 public void execute() {
   Card card = null;
   if (container instanceof Field) {
     Field field = (Field) container;
     if (item instanceof Card) {
       card = (Card) item;
       field.removeItem();
     } else if (item instanceof OverRay) {
       OverRay overRay = (OverRay) item;
       Card topCard = overRay.getOverRayCards().topCard();
       overRay.getOverRayCards().remove(topCard);
       if (overRay.getOverRayCards().size() == 0) {
         field.removeItem();
       }
     }
   } else if (container instanceof HandCards) {
     card = (Card) item;
     ((HandCards) container).getCardList().remove(card);
   }
   if (card != null) {
     card.set();
     Deck banished = (Deck) duel.getDuelFields().getField(FieldType.BANISHED).getItem();
     banished.getCardList().push(card, true);
     duel.unSelect();
   }
 }
 @Override
 public void execute() {
   Card indicatorCard = null;
   if (item instanceof Card) {
     indicatorCard = (Card) item;
   } else if (item instanceof OverRay) {
     indicatorCard = ((OverRay) item).getOverRayCards().topCard();
   }
   if (indicatorCard != null && indicatorCard.isOpen()) {
     indicatorCard.getIndicator().increase();
   }
 }