/// <summary> /// Move all the cards in this zone to targetZone /// </summary> /// <param name="targetZone"></param> public void MoveAll(CardZone targetZone) { foreach (Card card in cards.ToArray()) { Move(card, targetZone); } }
/// <summary> /// Select a random card in this zone and move it to targetZone /// </summary> /// <param name="targetZone"></param> public void MoveRandom(CardZone targetZone) { if (cards.Count > 0) { targetZone.Add(cards.RemoveRandom()); } }
/// <summary> /// Move a list of cards in this zone to targetZone /// </summary> /// <param name="cardsToMove"></param> /// <param name="targetZone"></param> public void Move(List <Card> cardsToMove, CardZone targetZone) { foreach (Card card in cardsToMove) { Move(card, targetZone); } }
/// <summary> /// Move the card at index position in this zone to targetZone /// </summary> /// <param name="index"></param> /// <param name="targetZone"></param> public void MoveAt(int index, CardZone targetZone) { Card card = RemoveAt(index); targetZone.Add(card); }
/// <summary> /// Move a card to a target zone /// </summary> /// <param name="card"></param> /// <param name="targetZone"></param> public void Move(Card card, CardZone targetZone) { Remove(card); targetZone.Add(card); }