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); } }
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); } } } }