Exemplo n.º 1
0
        /// <summary>
        /// Method to end the game
        /// </summary>
        /// <param name="text"></param>
        private void EndGame(string text)
        {
            // Submit the score and get the index value for insertion into list
            int index = playerDataController.SubmitScore();

            // Check if the index is less than zero, if not, update records
            if (index >= 0)
            {
                // Show form and get name from form
                InputDialog input = new InputDialog(playerDataController);

                input.ShowDialog();

                // record player
                playerDataController.Record(index);
            }

            // Show High Scores
            frmHighScore highScore = new frmHighScore();

            highScore.ShowDialog();
        }