private void btn_Paper_Click(object sender, RoutedEventArgs e) { userChoice = "p"; RockPaperScissors RPS = new RockPaperScissors(userChoice); int computerThrow = RPS.computerThrow(); int playerThrow = RPS.playerChoiceToInt(userChoice); txt_computerChoice.Text = RPS.computerChoiceToString(computerThrow); txt_winner.Text = RPS.determineWinner(computerThrow, playerThrow); btn_paper.Background = Brushes.DarkRed; btn_paper.Foreground = Brushes.AntiqueWhite; toggle_disabled(); }
private void btn_scissors_Click(object sender, RoutedEventArgs e) { userChoice = "s"; RockPaperScissors RPS = new RockPaperScissors(userChoice); int computerThrow = RPS.computerThrow(); int playerThrow = RPS.playerChoiceToInt(userChoice); txt_computerChoice.Text = RPS.computerChoiceToString(computerThrow); txt_winner.Text = RPS.determineWinner(computerThrow, playerThrow); btn_scissors.Background = Brushes.DarkSeaGreen; toggle_disabled(); }