Beispiel #1
0
        private void HitButton_Click(object sender, RoutedEventArgs e)
        {
            DoubleDownButton.Visibility = Visibility.Hidden;
            SplitButton.Visibility      = Visibility.Hidden;

            string playerName = GetCurrentPlayerName();

            BlackJackController.HitMe(playerName, false);
            if (BlackJackController.IsBusted(playerName, false))
            {
                HitButton.Visibility = Visibility.Hidden;
                PlayerBustDisplays[playerTurn].Content = "Busted";
            }
            //UpdateHands();
            DisplayCurrentHand();
            PlayerTotalDisplays[playerTurn].Content = $":{BlackJackController.GetTotal(GetCurrentPlayerName(), false)}";
        }