Esempio n. 1
0
        /// <summary>
        /// Give a card to the dealer from the top of some deck (with animation)
        /// </summary>
        private void MoveCardToDealer()
        {
            cardtable.DrawOptions();

            int  nDeck;
            Card card = game.PopCardFromDeck(out nDeck);

            // Dealer can get busted or get a score of 21 after receiving new card (just like any player)
            try
            {
                game.GetDealer().TakeCard(card);
            }
            catch (BustException)
            {
                game.DealerBust = true;
            }
            catch (BlackjackException)
            {
                game.DealerBlackjack = true;
            }

            //Animate
            cardtable.DrawCard(card, nDeck);
            Thread.Sleep(300);

            cardtable.DrawShoes();
            cardtable.ShowDealerHand();

            cardtable.Invalidate();
        }