Exemplo n.º 1
0
        public void Stay()
        {
            round_replay.PushAction(0, Player.Hand.GetHighValue(), DealerHand.Cards[1].NumValue);
            while (DealerShouldHit())
            {
                DealerHand.AddCard(Deck.DrawCard());
            }

            if (DealerHand.HasBlackJack() && !Player.Hand.HasBlackJack())
            {
                EndRound(false);
            }
            else if (DealerHand.GetHighValue() > 21)
            {
                EndRound(true);
            }
            else if (Player.Hand.GetHighValue() >= DealerHand.GetHighValue())
            {
                EndRound(true);
            }
            else
            {
                EndRound(false);
            }
        }
Exemplo n.º 2
0
 public bool DealerShouldHit() //Dealer stays on all 17's
 {
     if (DealerHand.GetHighValue() < 17)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
 public void EndRound(bool win)
 {
     CanAct = false;
     round_replay.PushAction(2, Player.Hand.GetHighValue(), DealerHand.GetHighValue());
     round_replay.SetWin(win);
 }