예제 #1
0
        private void StandButton_Click(object sender, RoutedEventArgs e)
        {
            playerTurn--;

            if (playerTurn < 0)
            {
                HitButton.Visibility        = Visibility.Hidden;
                DoubleDownButton.Visibility = Visibility.Hidden;
                StandButton.Visibility      = Visibility.Hidden;
                SplitButton.Visibility      = Visibility.Hidden;

                TurnLabel.Content = "Turn:";
                BlackJackController.HouseTurn();
                UpdateHands();
                EndGame();
            }
            else
            {
                HitButton.Visibility        = Visibility.Hidden;
                DoubleDownButton.Visibility = Visibility.Hidden;
                StandButton.Visibility      = Visibility.Hidden;
                SplitButton.Visibility      = Visibility.Hidden;

                D1Button.Visibility  = Visibility.Visible;
                D5Button.Visibility  = Visibility.Visible;
                D10Button.Visibility = Visibility.Visible;

                TurnLabel.Content = $"Turn: {PlayerNameDisplays[playerTurn].Content.ToString()}";
                HideCurrentHand(false);
            }
        }