private void btnHit_Click(object sender, EventArgs e)
        {
            hand2.AddCard(aDeck.DealCard());
            ShowHand(Panel2, hand2);
            tboScorePlayer.Text = HandSum(hand2).ToString();

            if (HandSum(hand2) > 21)
            {
                lose.Play();
                MessageBox.Show("You're bust!", "You lose");
                AskToRestart();
            }

            else if (HandSum(hand2) == 21)
            {
                win.Play();
                MessageBox.Show("Blackjack!", "You win");
                AskToRestart();
            }
        }
Exemplo n.º 2
0
 public void Draw(List <string> Cards)
 {
     string card = d.DealCard(Cards);
 }