Пример #1
0
        public void StartNewGame()
        {
            Deck = new Deck();
            Deck.Shuffle();

            foreach (var player in Players)
            {
                player.DiscardCards();
                player.GetCard(Deck.GetTopCard());
            }
            Dealer.DiscardCards();
            Dealer.GetCard(Deck.GetTopCard());


            foreach (var player in Players)
            {
                player.GetCard(Deck.GetTopCard());
            }
            Dealer.GetCard(Deck.GetTopCard());
        }
Пример #2
0
 internal void PlayGame()
 {
     foreach (var player in Players)
     {
         while (player.GetHandValue() < 17)
         {
             player.GetCard(Deck.GetTopCard());
         }
     }
     while (Dealer.GetHandValue() < 17)
     {
         Dealer.GetCard(Deck.GetTopCard());
     }
 }