Example #1
0
        }//end ctor

        public string ChooseOption(string input, Fighter f)
        {
            try
            {
                switch (input)
                {
                case "p":
                    //goes to Practice Fight vs. Pip (TO-DO)
                    break;

                //in case the user has Caps Lock engaged
                case "P":
                    break;

                //goes to the Combat Menu
                case "f":
                    EnemyGladiator enemy1 = new EnemyGladiator(enemyPick);
                    enemyPick++;
                    CombatMenu cm = new CombatMenu(f, enemy1);
                    break;

                //same deal, user CAPS
                case "F":
                    EnemyGladiator enemy2 = new EnemyGladiator(enemyPick);
                    enemyPick++;
                    CombatMenu cM = new CombatMenu(f, enemy2);
                    break;

                //goes to Choose Weapon Menu
                case "c":
                    break;

                //user CAPS
                case "C":
                    break;

                //goes to Character View Page (TO-DO)
                case "g":
                    MainMenu mm = new MainMenu(f);
                    break;

                //user CAPS
                case "G":
                    MainMenu mn = new MainMenu(f);
                    break;

                //throws exception if format is screwy
                default:
                    throw new FormatException("Incorrect input, please try again.");
                } //end switch
            }     //end try
            catch (FormatException)
            {
                ArenaMenu arenaMenu = new ArenaMenu(f);
            } //end catch
            return(input);
        }     //end MainMenu ChooseOption method
Example #2
0
        }//end ctor

        public string ChooseOption(string input, Fighter f, int enemyPick)
        {
            try
            {
                switch (input)
                {
                case "p":
                    //goes to Practice Fight vs. Pip (TO-DO)
                    break;

                //goes to the Combat Menu
                case "f":
                    EnemyGladiator enemy1 = new EnemyGladiator(enemyPick, f);
                    Console.WriteLine("You will be fighting {0} in the arena!", enemy1.Name);
                    CombatMenu cm = new CombatMenu(f, enemy1, enemyPick);
                    break;

                //goes to Gladiator Store (TO-DO)
                case "c":
                    break;

                //goes to Character View Page (TO-DO)
                case "g":
                    MainMenu mm = new MainMenu(f, enemyPick);
                    break;

                //throws exception if format is screwy
                default:
                    //throw new FormatException("Incorrect input, please try again.");
                    break;
                } //end switch
            }     //end try
            catch (FormatException)
            {
                Console.WriteLine("Invalid input, try again.");
                ArenaMenu arenaMenu = new ArenaMenu(f, enemyPick);
            } //end catch
            return(input);
        }     //end MainMenu ChooseOption method