Beispiel #1
0
 /// <summary>
 /// Utility method for copying card instances into another Cards
 /// instance-used in Deck.Shuffle(). This implementation assumes that
 /// source and target collections are ths same size.
 /// </summary>
 /// <param name="targetCards"></param>
 public void CopyTo(Cards targetCards)
 {
     for (int index = 0; index < targetCards.Count(); index++)
     {
         targetCards[index] = this[index];
     }
 }
Beispiel #2
0
 //addcardtoriver method, will add a card to Board
 public void AddCard(Card card)
 {
     theBoard.Add(card);
     riverCardsRemaning = theBoard.Count();
 }
Beispiel #3
0
 //addcardtohand method, add a card to the players hand
 public void AddCard(Card card)
 {
     hand.Add(card);
     cardCount = hand.Count();
 }