Ejemplo n.º 1
0
        public Enums.PlayAction DetermineCorrectPlayAction(HandInformation handInformation, uint dealerUpCard)
        {
            Enums.PlayAction result;

            if (handInformation.IsSplitable)
            {
                result = DoSplitRules(handInformation.Cards[0], dealerUpCard);
            }
            else if (handInformation.IsSoft)
            {
                result = DoSoftRules(handInformation.HandValue, dealerUpCard);
            }
            else
            {
                result = DoHardRules(handInformation.HandValue, dealerUpCard);
            }

            if (!handInformation.OkayToDouble && result == Enums.PlayAction.Double)
            {
                result = Enums.PlayAction.Stand;
            }

            return result;
        }
Ejemplo n.º 2
0
 public void SetNewHand(uint[] cards)
 {
     Hand = new HandInformation(isDealerHand: true);
     Hand.Cards.AddRange(cards);
 }
Ejemplo n.º 3
0
 public PlayersHands()
 {
     Hands = new HandInformation[2];
     Hands[0] = new HandInformation(isDealerHand: false);
     Hands[1] = new HandInformation(isDealerHand: false);
 }