Esempio n. 1
0
        protected override int processMenuChoice(int choice)
        {
            switch (choice)
            {
            case 1:
                if (enemies.Count > 0)
                {
                    new Battle(player, enemies);
                }
                break;

            case 2:
                addEnemy();
                break;

            case 3:
                StatViewer.viewCharacter(player);
                break;

            case 4:
                break;

            default:
                choice = displayMenu();
                break;
            }

            return(choice);
        }
Esempio n. 2
0
        /// <summary>
        /// Processes the chosen option on the menu
        /// </summary>
        /// <param name="choice"></param>
        /// <returns></returns>
        protected override int processMenuChoice(int choice)
        {
            switch (choice)
            {
            case 1:
                if (player == default(Character))
                {
                    player = new Character(true);
                }

                BattleMenu bm = new BattleMenu(player);
                break;

            case 2:
                if (player == default(Character))
                {
                    player = new Character(true);
                }

                StatViewer.viewCharacter(player);
                break;

            case 3:
                break;

            case 4:
                break;

            case 5:
                break;

            case 6:
                break;

            default:
                Console.WriteLine("Invalid choice");
                processMenuChoice(displayMenu());
                break;
            }

            return(choice);
        }