Esempio n. 1
0
        /// <summary>
        /// The setup menu was clicked, perform the button's action.
        /// <param name="button">the button pressed</param>
        /// </summary>
        private static void PerformSetupMenuAction(int button)
        {
            switch (button)
            {
            case SETUP_MENU_EASY_BUTTON:
            {
                GameController.SetDifficulty(AIOption.Easy);
                break;
            }

            case SETUP_MENU_MEDIUM_BUTTON:
            {
                GameController.SetDifficulty(AIOption.Medium);
                break;
            }

            case SETUP_MENU_HARD_BUTTON:
            {
                GameController.SetDifficulty(AIOption.Hard);
                break;
            }
            }
            // Always end state
            GameController.EndCurrentState();
        }
        /// <summary>
        /// The setup menu was clicked, perform the button's action.
        /// </summary>
        /// <param name="button">the button pressed</param>
        private static void PerformSetupMenuAction(int button)
        {
            switch (button)
            {
            case SETUP_MENU_EASY_BUTTON:
                GameController.SetDifficulty(AIOption.Hard);
                break;

            case SETUP_MENU_MEDIUM_BUTTON:
                GameController.SetDifficulty(AIOption.Hard);
                break;

            case SETUP_MENU_HARD_BUTTON:
                GameController.SetDifficulty(AIOption.Hard);
                break;
            }
            //Always end state - handles exit button as well
            GameController.EndCurrentState();
        }