/// <summary> /// shows the dealers first and second card, /// </summary> private void DealerHandfinnish() { lbl_dealerCards.Text = dealer.HandsToString(); lbl_valueOfCards_dealer.Text = dealer.HandValue().ToString(); while (!dealer.IsFinished) { gameManager.DealersTurn(); lbl_dealerCards.Text = dealer.HandsToString(); lbl_valueOfCards_dealer.Text = dealer.HandValue().ToString(); if (dealer.IsThick) { lbl_dealerShowValue.Visible = true; lbl_dealerShowValue.Text = "Dealer Busted"; } else if (dealer.HasBlackJack) { lbl_dealerShowValue.Visible = true; lbl_dealerShowValue.Text = "Dealer has blackjack!"; } else { lbl_dealerShowValue.Visible = true; lbl_dealerShowValue.Text = dealer.HandValue().ToString(); } } MessageBox.Show(gameManager.Results(), "Results"); btn_dealNewRound.Visible = true; btn_player1_hit.Visible = false; btn_playerStand.Visible = false; }
/// <summary> /// checks the players bools. /// </summary> private void checkPlayerScore() { Thread.Sleep(1000); if (currentPlayer.HasBlackJack) { lbl_playerShowValue.Visible = true; lbl_playerShowValue.Text = "BLACKJACK!!!"; MessageBox.Show("BlackJack!!!! \nPress ok for next player"); GetNextPlayer(); } else if (currentPlayer.IsThick) { lbl_playerShowValue.Visible = true; lbl_playerShowValue.Text = "BUSTED...!"; MessageBox.Show("Busted..\nPress ok for next player"); GetNextPlayer(); } else { lbl_playerShowValue.Visible = true; lbl_playerShowValue.Text = currentPlayer.HandValue().ToString(); } }