コード例 #1
0
ファイル: Moderator.cs プロジェクト: grayingram/Manager
        public void Test()
        {
            Reserve reserve = CheckAvailable();

            if (reserve.Fact)
            {
                lawyer.Message("The Pokemon:" + reader.GetPokemonName(reserve.Pokemon) + " is available!");
            }
            else
            {
                lawyer.Message("The Pokemon:" + reader.GetPokemonName(reserve.Pokemon) + " is available!");
            }
        }
コード例 #2
0
ファイル: Moderator.cs プロジェクト: grayingram/Manager
        public void SetReservableMon()
        {
            string  username = lawyer.GetResponse("What is the Legends username?");
            Reserve reserve  = CheckAvailable();

            if (reserve.Fact)
            {
                updater.SetReserveMon(username, reserve.Pokemon);
            }
            else
            {
                Console.WriteLine("sorry try again");
            }
        }
コード例 #3
0
ファイル: Moderator.cs プロジェクト: grayingram/Manager
        public Reserve CheckAvailable()
        {
            Reserve reserve;
            int     dexNum  = lawyer.GetInt("What is dex number of the final evo or split of dex number of the pokemon?");
            string  pokemon = reader.GetPokemonName(dexNum);

            foreach (Available mon in Availables)
            {
                if (mon.PokeName == pokemon)
                {
                    reserve = new Reserve(true, dexNum);
                    return(reserve);
                }
            }
            Console.WriteLine("That pokemon evolution line is unavailable, Sorry.");
            if (lawyer.GetYesNo("Would you like check the availability of another pokemon line?"))
            {
                CheckAvailable();
            }
            reserve = new Reserve(false, dexNum);
            return(reserve);
        }