Пример #1
0
        }//end of NumPlayers

        //prompt user to play another game
        static bool PlayAgain()
        {
            string playAgain;

            Console.Write("\nPress Enter key to continue...");
            Console.ReadLine();

            Console.Write("\n\n\nPlay Again? (Y or N): ");
            playAgain = Console.ReadLine();

            if (playAgain == "Y" || playAgain == "y")
            {
                //clear Players binding list to play a new game
                SpaceRaceGame.ResetPlayers();
                return(true);
            }
            else
            {
                Console.Write("\n\nThanks for playing Space Race.\n");
                return(false);
            }
        }//end playAgain method