Esempio n. 1
0
        static void Main(string[] args)
        {
            var Initial_Pokemon = CreateRandomPokemon();
            var manager         = new PokemonManager();

            PokemonManager.AddPokemon(manager, Initial_Pokemon);
            Console.WriteLine("欢迎来到宠物小精灵世界,获得你的初始小精灵");
            Console.WriteLine("恭喜你获得了:等级{0} {1}", Initial_Pokemon.Level, Initial_Pokemon.Name);
            Console.WriteLine("-------------------------------------------------");
            Action_1(manager);


            //PokemonManager.PrintAllPokemon(manager.dictionary);


            Console.ReadKey();
        }
Esempio n. 2
0
 public static void Action_2(PokemonManager manager, Pokemon pokemon)
 {
     while (true)
     {
         Console.WriteLine("你选择:1.收服 2.离开");
         int n = InputKeyInfo_ToInt(Console.ReadKey());
         if (!(n == 1 || n == 2))
         {
             continue;
         }
         if (n == 1)
         {
             PokemonManager.AddPokemon(manager, pokemon);
             Console.WriteLine("你成功收服了:等级{0} {1}", pokemon.Level, pokemon.Name);
             return;
         }
         Console.WriteLine("你嫌它太丑,离开了...");
         return;
     }
 }