예제 #1
0
        private void StartGame()
        {
            lblMsg.Text           = "";
            btnHit.Enabled        = true;
            btnStand.Enabled      = true;
            lblCustomerPt.Visible = true;
            lblDealerPt.Visible   = true;

            btnHit.BackColor   = Color.LimeGreen;
            btnStand.BackColor = Color.LimeGreen;

            deck     = Deck.GetDeck();
            dealer   = Dealer.GetDealer();
            customer = Customer.GetCustomer();

            for (int i = 0; i < 2; i++) //Two cards must be dealed in the beginning
            {
                DealCards(i, deck, dealer);
                DealCards(i, deck, customer);
            }

            ControlForCustomer();   //Check if customer is blackjack
        }