示例#1
0
        /// <summary>Action taking place on the Dealer's turn.</summary>
        private void DealerAction()
        {
            bool keepGoing = true;

            while (keepGoing)
            {
                if (DealerHand.ActualValue == 21)
                {
                    keepGoing = false;
                }
                else if (DealerHand.ActualValue >= 17)
                {
                    if (DealerHand.ActualValue > 21 && DealerHand.HasAceEleven())
                    {
                        ConvertAce(DealerHand);
                    }
                    else
                    {
                        keepGoing = false;
                    }
                }
                else
                {
                    DealCard(DealerHand);
                }
            }
        }