Beispiel #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
Beispiel #2
0
        public string ChooseOption(string input, Fighter f)
        {
            try
            {//make sure user doesn't fat finger this menu, 
             //wanted to implement String.ToLower, but can't 
             //get it to work at this time (do more research)

                switch (input)
                {
                    //goes to the Arena Menu (TO-DO)
                    case "e":
                        ArenaMenu arena = new ArenaMenu(f);
                        break;
                    //same deal, user CAPS
                    case "E":
                        ArenaMenu arenaa = new ArenaMenu(f);
                        break;
                    //goes to Options Menu
                    case "c":
                        break;
                    //user CAPS
                    case "C":
                        break;
                    //goes to Character View Page (TO-DO)
                    case "v":
                        break;
                    //user CAPS
                    case "V":
                        break;
                    //quits game, prompts save (TO-DO)
                    case "q":
                        break;
                    //quits game in ALL CAPS
                    case "Q":
                        break;
                    //starts loop over when user inputs something other than menu 
                    default:
                        throw new FormatException("Incorrect input, please try again.");

                }//end switch

            }//end try
            catch(FormatException)
            {
                MainMenu mm = new MainMenu(f);
            }//end catch
            return input;
        }//end MainMenu ChooseOption method
Beispiel #3
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
Beispiel #4
0
        public string ChooseOption(string input, Fighter f, int enemyPick)
        {
            try
            {//make sure user doesn't fat finger this menu, 
             //wanted to implement String.ToLower, but can't 
             //get it to work at this time (do more research)

                switch (input)
                {
                    //goes to the Arena Menu (TO-DO)
                    case "e":
                        ArenaMenu arena = new ArenaMenu(f, enemyPick);
                        break;
                    //goes to Options Menu
                    case "c":
                        break;
                    //goes to Character View Page (TO-DO)
                    case "v":
                        break;
                    //quits game, prompts save (TO-DO)
                    case "q":
                        //SaveGame();
                        QuitGame();
                        break;
                    //starts loop over when user inputs something other than menu 
                    default:
                        throw new FormatException();

                }//end switch

            }//end try
            catch(FormatException)
            {
                Console.WriteLine("\nInvalid input, please try again.");
                MainMenu mm = new MainMenu(f, enemyPick);
            }//end catch
            return input;
        }//end MainMenu ChooseOption method