コード例 #1
0
 public void Transfer(CardArea target, List <Card> cards)
 {
     cards = new List <Card>(cards); // Stop bad things from happening.
     foreach (Card card in cards)
     {
         this.Transfer(target, card);
     }
 }
コード例 #2
0
 public virtual void Transfer(CardArea target, Card card)
 {
     if (target != null && this.cards.Contains(card))
     {
         if (target is QuestArea)
         {
             QuestArea qatarget = target as QuestArea;
             qatarget.Add(card);
             if (qatarget.cards.Contains(card))
             {
                 this.Remove(card);
             }
         }
         else
         {
             target.Add(card);
             if (target.cards.Contains(card))
             {
                 this.Remove(card);
             }
         }
     }
 }