Exemplo n.º 1
0
 //TODO: Allow option to drop a pokemon
 public void AddPokemon(PlayerPokemon pokemon)
 {
     for (int i = Team.Length - 1; i >= 0; i--)
     {
         if (Team[i] == null)
         {
             Team[i] = pokemon;
             Console.WriteLine($"{pokemon.Name} added to {Name}'s team!");
             return;
         }
     }
     Console.WriteLine("No space for your Pokemon!");
     return;
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //MainAsync().Wait();


            IPokemon Charizard = new PlayerPokemon("Silas", 100, 50, 60, PokemonType.Fire);
            //IPokemon Blastoise = new Pokemon("Blastoise", 100, 70, 80, PokemonType.Water);
            Player Kyle = new Player("Kyle");

            Kyle.AddPokemon((PlayerPokemon)Charizard);
            Kyle.ActivePokemon = Kyle.Team[5];

            //WildPokemonEncounter battle = new WildPokemonEncounter(Charizard, Blastoise);
            Game Game = new Game(Kyle);

            while (Game.GameOver == false)
            {
                Console.WriteLine("Press M to move.");
                Console.WriteLine("Press E to Exit.");
                string response = Console.ReadLine();

                if (response == "m")
                {
                    Console.WriteLine("Player moves forward through the grass...");
                    Game.Move();
                }
                else if (response == "e")
                {
                    Game.GameOver = true;
                    Console.WriteLine("Exiting game!");
                }
            }



            //battle.TakeTurn();
            //battle.TakeTurn();
            //battle.TakeTurn();

            //battle.AttemptToCatchPokemon(Kyle);

            Console.ReadLine();
        }