Exemplo n.º 1
0
 public void AddCardToDealerHand(Card card)
 {
     if (card != null)
     {
         _dealerCards.Add(card);
         if (_dealerCards.Count() >= 2)
         {
             DealerHand = new BlackjackHand(_dealerCards);
         }
     }
 }
 public void AddCardToHand(Card card)
 {
     if (card != null)
     {
         _cards.Add(card);
         if (_cards.Count() >= 2)
         {
             Hand = new BlackjackHand(_cards);
         }
     }
 }
        public BlackjackHandSettlement(BlackjackGameRoundPlayer player, BlackjackHand dealerHand)
        {
            if (player == null)
            {
                throw new ArgumentNullException("player");
            }

            if (player.Hand == null)
            {
                throw new ArgumentNullException("player.hand");
            }

            if (dealerHand == null)
            {
                throw new ArgumentNullException("dealerHand");
            }

            DealerHand     = dealerHand;
            PlayerHand     = player.Hand;
            PlayerPosition = player.Player.Position;
            WagerAmount    = player.Wager;
            WagerOutcome   = GetOutcome();
        }