Beispiel #1
0
 public void Add(PokerCard card)
 {
     if (card != null && cards.Count < HAND_SIZE)
     {
         cards.Add(card);
         cards.Sort();
     }
 }
Beispiel #2
0
        public PokerDeck()
        {
            cards  = new List <PokerCard>();
            random = new Random();

            for (int index = 0; index < TOTAL_VALUES; index++)
            {
                foreach (CardSuit suit in Enum.GetValues(typeof(CardSuit)))
                {
                    var card = new PokerCard(index, suit);
                    cards.Add(card);
                }
            }
        }