Beispiel #1
0
 /// <summary>
 /// Method checks if <c>PlayerCards</c> is empty
 /// and if so, shuffles <c>CardsForShuffle</c> and adds them back to <c>PlayerCards</c> queue.
 /// Once added, <c>CardsForShuffle</c> is cleared
 /// </summary>
 public void MoveToPlayerCards(int cardsLeft)
 {
     if (PlayerCards.Count < cardsLeft)
     {
         Services.ShuffleCards(CardsForShuffle);
         CardsForShuffle.ForEach(card => PlayerCards.Enqueue(card));
         CardsForShuffle.Clear();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Method handles adding new 'won' <c>Card</c> objects to <c>CardsForShuffle</c>
 /// </summary>
 /// <param name="newCards">List of won <c>Card</c> objects from round</param>
 public void AddCards(List <Card> newCards)
 {
     CardsForShuffle.AddRange(newCards);
 }