コード例 #1
0
 public void NewGame()
 {
     //function which check if user will be in top
     //if so
     sceneManager.StartMenu();
     if (Whois.CheckScore(scorePlayer, "Single"))
     {
         Console.WriteLine(" Insert Name ");
         string name = Console.ReadLine();
         Whois.SendScore(scorePlayer, name, "Single");
     }
 }
コード例 #2
0
        public void NewGame()
        {
            sceneManager.StartMenu();

            if (Whois.CheckScore(scorePlayer, "Multi"))
            {
                Console.WriteLine(" Insert first Name ");
                string name = Console.ReadLine();
                Whois.SendScore(scorePlayer, name, "Multi");
            }
            if (Whois.CheckScore(scorePlayerTwo, "Multi"))
            {
                Console.WriteLine(" Insert second Name ");
                string name = Console.ReadLine();
                Whois.SendScore(scorePlayerTwo, name, "Multi");
            }
        }
コード例 #3
0
        protected override void OnKeyPress(KeyPressEventArgs e)
        {
            base.OnKeyPress(e);

            if (e.KeyChar == 27) // ESC
            {
                Exit();
            }

            switch (e.KeyChar)
            {
            case '1':
                Score();
                break;

            case '2':     // Forward
                AIMenu();
                break;

            case '3':
                StartNewGame2();


                break;

            case '4':
                string IP = null;
                do
                {
                    Console.WriteLine("Insert IP to conect witch Server!");
                    IP = Console.ReadLine();
                    Console.WriteLine(IP);
                    if (Console.ReadKey().Key == ConsoleKey.Escape)     // ESC
                    {
                        break;
                    }
                }while (!Whois.MakeATest(IP));
                Console.WriteLine("OK");
                break;


            case '5':
                diff = "easy";

                StartNewGame();
                break;

            case '6':
                diff = "hard";
                StartNewGame();
                break;

            case '7':

                Whois.GetTopSingle();
                Whois.DisplayTopSingle();

                break;

            case '8':
                Whois.GetTopMulti();
                Whois.DisplayTopMulti();

                break;

            case '9':

                StartMenu();

                break;
            }
        }