コード例 #1
0
        public void LaunchSizeMenu()
        {
            List <string> options = new List <string>();

            options.Add("40 x 20");
            options.Add("50 x 30");
            options.Add("100 x 40");

            Menu menu = new Menu(options, "WIELKOŚĆ MAPY", new Point(BANNER_HEIGHT + 1, 2));

            menu.PrintTitle();
            menu.PrintOptions();
            menu.Choose();

            switch (menu.GetCurrentOption())
            {
            case "40 x 20":
                mapHeight = 20;
                mapWidth  = 40;
                break;

            case "50 x 30":
                mapHeight = 30;
                mapWidth  = 50;
                break;

            case "100 x 40":
                mapHeight = 40;
                mapWidth  = 100;
                break;
            }
        }
コード例 #2
0
        public void LaunchSpeedMenu()
        {
            List <string> options = new List <string>();

            options.Add("WOLNO");
            options.Add("NORMALNIE");
            options.Add("SZYBKO");

            Menu menu = new Menu(options, "PRĘDKOŚĆ", new Point(BANNER_HEIGHT + 1, 2));

            menu.PrintTitle();
            menu.PrintOptions();
            menu.Choose();

            switch (menu.GetCurrentOption())
            {
            case "WOLNO":
                wait = 200;
                break;

            case "NORMALNIE":
                wait = 100;
                break;

            case "SZYBKO":
                wait = 50;
                break;
            }
        }