/// <summary> /// Allows the player to go back to the main menu. /// </summary> private void btn_Back_Click(object sender, RoutedEventArgs e) { IntroScreen introScreen = new IntroScreen(); introScreen.Show(); this.Close(); }
/// <summary> /// Allows the current <see cref="Player"/> to quit the game. /// </summary> private void btn_Quit_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Are you sure you would like to quit? Your progress will not be saved!", "Confirm", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { IntroScreen introScreen = new IntroScreen(); introScreen.Show(); this.Close(); } }
/// <summary> /// Allows the current <see cref="Player"/> to end the game. /// </summary> private void btn_EndGame_Click(object sender, RoutedEventArgs e) { Player[][] winners = gameModel.endGame(); DisplayWinners(winners); IntroScreen introScreen = new IntroScreen(); introScreen.Show(); this.Close(); }