示例#1
0
文件: Cards.cs 项目: bbollig/CardLib
 /// <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];
     }
 }
示例#2
0
 //addcardtoriver method, will add a card to Board
 public void AddCard(Card card)
 {
     theBoard.Add(card);
     riverCardsRemaning = theBoard.Count();
 }
示例#3
0
文件: Hand.cs 项目: czarVB/OOP-FP2
 //addcardtohand method, add a card to the players hand
 public void AddCard(Card card)
 {
     hand.Add(card);
     cardCount = hand.Count();
 }