Beispiel #1
0
        public Action Get(Hand playerhand, Card dealercard)
        {
            _PlayerHand = playerhand;
            _DealerCard = dealercard;

            if (_PlayerHand.Value < 14) return Action.Hit;

            if (_PlayerHand.Value < 17)
            {
                if (_DealerCard.Index == 0 || _DealerCard.Index > 6)
                {
                    return Action.Hit;
                }
            }

            return Action.Stand;
        }
Beispiel #2
0
 public void Generate(int decks)
 {
     _Deck = new List<Card>();
     for (int k = 0; k < decks; k++)
     {
         for (int i = 0; i < 4; i++)
         {
             for (int j = 0; j < 13; j++)
             {
                 Card card = new Card();
                 card.Suit = i;
                 card.Index = j;
                 _Deck.Add(card);
             }
         }
     }
 }
Beispiel #3
0
 public void Add(Card card)
 {
     _Cards.Add(card);
 }