コード例 #1
0
        private void GameOver(object sender, EventArgs e)
        {
            _timer.Stop();

            string winnerMessage = $"The winner is: {_game.Winner.Name}";

            LeftInformativeLabel.Content   = winnerMessage;
            RightInformative_Label.Content = winnerMessage;

            // show high scores window
            var window = new HighScores(new Summary(_game.Winner.Name, _game.GetCurrentPlayer().Name));

            window.Show();
            window.Closed += CloseWindow;
            // if the highscores window is closed, go back to main menu
        }