Esempio n. 1
0
        /// <summary>
        /// Method starts new game (new shuffle)
        /// </summary>
        public async void StartNewShuffle()
        {
            // new game
            game.Shuffle();
            nDealerWaits = 0;

            // give two cards to each player
            for (int i = 0; i < game.GetPlayersCount(); i++)
            {
                await Task.Delay(700);

                MoveCardToPlayer(i);
                await Task.Delay(700);

                MoveCardToPlayer(i);
            }

            // give card to the dealer
            await Task.Delay(700);

            MoveCardToDealer();

            // iterate across all players and see if someone's got blackjack on 2 cards
            for (int i = 0; i < game.GetPlayersCount(); i++)
            {
                // in that case dealer should act specially
                DealerFirstHit(i);
            }
        }