예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 /// <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());
     }
 }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
        /// <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);
        }
예제 #5
0
 /// <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);
 }