//------------------------------------------------------ public bool MoveCardTo(CardType card, BaseDeck <CardType> other) { if (Contains(card)) { other.AddCard(card); m_cards.Remove(card); return(true); } return(false); }
//------------------------------------------------------ public int MoveCardsTo(int requested, BaseDeck <CardType> other) { int oldSize = Size; if (requested >= oldSize) { other.AddCards(m_cards); m_cards.Clear(); return(oldSize); } else { int index = oldSize - requested; List <CardType> drawed = m_cards.GetRange(index, requested); other.AddCards(drawed); m_cards.RemoveRange(index, requested); return(requested); } }
public void CopyFrom(BaseDeck <CardType> other) { m_owner = other.Owner; AddCards(other.Cards); }
//------------------------------------------------------ public void MoveAllCardsTo(BaseDeck <CardType> other) { MoveCardsTo(Size, other); }