示例#1
0
文件: UI.cs 项目: Rina-redis/SeaWars
        public void AskForNewGame()
        {
            int playAgain;

            Console.WriteLine("Want to play Again?");
            Console.WriteLine("If Yes, write 1, If No write 0");
            bool result = int.TryParse(Console.ReadLine(), out playAgain);

            switch (playAgain)
            {
            case 0:
                Console.Write("Thanks for playing))");
                break;

            case 1:
                Lobby lobby = new Lobby();
                lobby.Start();
                break;

            default:
                Console.Write("Thanks for playing))");
                break;
            }
        }
示例#2
0
 static void Main(string[] args)
 {
     Lobby lobby = new Lobby();
     lobby.Start();
 }