public void AddHandOutcome(PlayerHand playerCards, DealerHand dealerCards)
        {
            var outcome = new HandOutcome()
            {
                DealerShowCard = dealerCards.GetShowCard(),
                PlayerCardOne  = playerCards.Cards[0],
                PlayerCardTwo  = playerCards.Cards[1],
                DealerTotal    = dealerCards.Value(),
                PlayerTotal    = playerCards.Value(),
                WinAmount      = playerCards.HandWinAmount()
            };

            HandOutcomes.Add(outcome);
        }
Ejemplo n.º 2
0
 private void CompletePlayerHands()
 {
     foreach (var player in _players)
     {
         var hand = _playerCards[player];
         if (!hand.IsDouble(player.Strategy, _dealerHand.GetShowCard()))
         {
             while (!hand.IsKilled && !hand.IsComplete(player.Strategy, _dealerHand.GetShowCard()))
             {
                 hand.AddCard(_shoe.GetCardFromShoe());
             }
         }
         else
         {
             player.ChargePlayer(1);
             hand.Double();
             hand.AddCard(_shoe.GetCardFromShoe());
         }
         if (hand.IsBusted())
         {
             hand.Kill();
         }
     }
 }