Пример #1
0
 /// <summary>
 /// Add a card to the players hand
 /// </summary>
 /// <param name="card">card to add</param>
 public void AddToHand(Card card)
 {
     if (card != null)
     {
         _hand.AddCard(card);
     }
 }
Пример #2
0
 /// <summary>
 /// Creates (hydrates) a full card deck based on Card suits and rank enum
 /// </summary>
 /// <param name="cs">Object to be hydrated</param>
 public void CreateDeck(CardPile cs)
 {
     foreach (CardSuit suit in Enum.GetValues(typeof(CardSuit)))
     {
         foreach (CardRank rank in Enum.GetValues(typeof(CardRank)))
         {
             cs.AddCard(new Card(suit, rank));
         }
     }
 }