Пример #1
0
        /// <summary>
        /// Method that basically plays round for both players.
        /// </summary>
        public void playRound()
        {
            d = new Deck();
            guestPlayer.checkRound();
            if ((housePlayer.showHand().BJscore()) > 0)  // Checking if new Round
            {
                guestPlayer.showHand().surrenderCards();
                housePlayer.showHand().surrenderCards();
            }

            housePlayer.getsCard(d.deal());
            guestPlayer.getsCard(d.deal()); guestPlayer.getsCard(d.deal());
            guestPlayer.showHand().ToString();
            if (guestPlayer.showHand().BJscore() == 21)
            {
                win++;
                MessageBox.Show("BlackJack!");
            }
            foreach (Observer x in obseveres)
            {
                x();
            }

            if (housePlayer.showHand().BJscore() == 21)     //checking for BlackJack
            {
                housePlayer.outcomeOfRound(Outcome.Win);
                MessageBox.Show("HousePlayer holds a BlackJack and Wins!!!");
            }
        }
Пример #2
0
 /// <summary>
 /// Method that will show the BlackJack score for Human player in form
 /// </summary>
 public void showScore()
 {
     label1.Text = "Score = " + h.showHand().BJscore() + "\nRound: " + h.checkRound() + "\nWins: " + h.checkWin();
     Refresh();
 }