Start() public method

public Start ( ) : void
return void
Esempio n. 1
0
        private void MenuEnterEvent(GameProperties props, int selectableFieldRowCount, int row)
        {
            /* Switch process description:
             * 4 - value of possible maximum count of menu items in game (step back, save, main menu, quit)
             * MenuOptions.Count - current count of menu items
             * row - current selected row (field height + current selected index in MenuOptions)
             * selectableFieldRowCount - count of selectable rows for now:
             *      Before 1 player wins: field height + MenuOptions.Count
             *      After: MenuOptions.Count
             *
             * This flexible equation returns a value that will correspond to the desired item in the menu. */
            switch (4 - props.MenuOptions.Count + row - selectableFieldRowCount)
            {
            case 0:     // Step back
                props.Manager.DoStepBack(props);
                break;

            case 1:     // Save
                props.Manager.SaveProgress(props);
                break;

            case 2:     // Main Menu
                MenuManager newMenuManager = new MenuManager();
                newMenuManager.Start();
                break;

            case 3:     // Quit
                Environment.Exit(0);
                break;
            }
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            Console.OutputEncoding = System.Text.Encoding.UTF8;      // required for correct display of ♦ symbol
            Console.CursorVisible  = false;
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // Unix can't resize window
            {
                Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight);
            }
            MenuManager menuManager = new MenuManager();

            menuManager.Start();
        }
Esempio n. 3
0
        private void MenuEnterEvent(int selectableFieldRowCount, int row)
        {
            switch (row - selectableFieldRowCount)
            {
            case 0:     // Main Menu option
                MenuManager newMenuManager = new MenuManager();
                newMenuManager.Start();
                break;

            case 1:     // Quit
                Environment.Exit(0);
                break;
            }
        }
Esempio n. 4
0
 public void Start_Test()
 {
     MenuManager.Start();
     Assert.Equal(true, true);
 }
Esempio n. 5
0
 public void Start()
 {
     MenuManager.Start();
 }