Example #1
0
 public Pokemon(string speciesName, string nickName, int level, TypeOfPokemon pokemonType, TypeOfPokemon secondaryType, string moveOne, string moveTwo, string moveThree, string moveFour)
 {
     //TeamPosition = teamPosition;
     PokemonSpeciesName = speciesName;
     PokemonNickName    = nickName;
     Level         = level;
     PokemonType   = pokemonType;
     SecondaryType = secondaryType;
     MoveOne       = moveOne;
     MoveTwo       = moveTwo;
     MoveThree     = moveThree;
     MoveFour      = moveFour;
 }
Example #2
0
        private void AddPokemonToTeam()
        {
            List <Pokemon> pokemonTeam = _repo.GetPokemonTeam();

            if (pokemonTeam.Count >= 6)
            {
                Console.WriteLine("You already have 6 Pokemon on your team! You cant hold more than that! Please Remove a Pokemon first!");
                Console.ReadKey();
            }
            else
            {
                Console.Clear();
                Console.WriteLine("Lets add a new member to our team!" +
                                  "\n\nPokemon Species Name: ");
                string species = Console.ReadLine();

                Console.WriteLine("Pokemon Nick Name: ");
                string name = Console.ReadLine();

                Console.WriteLine("Pokemon Level: ");
                string pokeLevel = Console.ReadLine();

                if (!pokeLevel.All(char.IsDigit))
                {
                    Console.WriteLine("Pokemon Level must be whole numbers only!");
                    Console.ReadKey();
                }

                else
                {
                    int level = int.Parse(pokeLevel);


                    Console.WriteLine("Pokemon Type: " +
                                      "\n1. Normal" +
                                      "\n2. Grass" +
                                      "\n3. Fire" +
                                      "\n4. Water" +
                                      "\n5. Electric" +
                                      "\n6. Ice" +
                                      "\n7. Bug" +
                                      "\n8. Ground" +
                                      "\n9. Rock" +
                                      "\n10. Fighting" +
                                      "\n11. Psychic" +
                                      "\n12. Ghost" +
                                      "\n13. Dark" +
                                      "\n14. Fairy" +
                                      "\n15. Dragon");
                    TypeOfPokemon typeOne = (TypeOfPokemon)int.Parse(Console.ReadLine());

                    Console.WriteLine("Pokemon Secondary Type: " +
                                      "\n1. Normal" +
                                      "\n2. Grass" +
                                      "\n3. Fire" +
                                      "\n4. Water" +
                                      "\n5. Electric" +
                                      "\n6. Ice" +
                                      "\n7. Bug" +
                                      "\n8. Ground" +
                                      "\n9. Rock" +
                                      "\n10. Fighting" +
                                      "\n11. Psychic" +
                                      "\n12. Ghost" +
                                      "\n13. Dark" +
                                      "\n14. Fairy" +
                                      "\n15. Dragon" +
                                      "\n16. None");
                    TypeOfPokemon typeTwo = (TypeOfPokemon)int.Parse(Console.ReadLine());

                    Console.WriteLine("Name of First Move: ");
                    string moveOne = Console.ReadLine();
                    Console.WriteLine("Name of Second Move: ");
                    string moveTwo = Console.ReadLine();
                    Console.WriteLine("Name of Third Move: ");
                    string moveThree = Console.ReadLine();
                    Console.WriteLine("Name of Fourth Move: ");
                    string moveFour = Console.ReadLine();


                    Pokemon newPokemon = new Pokemon(species, name, level, typeOne, typeTwo, moveOne, moveTwo, moveThree, moveFour);
                    _repo.AddPokemonToTeam(newPokemon);
                    Console.WriteLine("Pokemon added!");
                    Console.ReadKey();
                }
            }
        }
Example #3
0
        private void UpdateAPokemon(int teamPosition)
        {
            Pokemon pokemon = _repo.GetPokemonByTeamPosition(teamPosition);

            Console.Clear();
            Console.WriteLine($"{pokemon.PokemonNickName}" +
                              $"\n{pokemon.PokemonSpeciesName}" +
                              $"\nLevel: {pokemon.Level}" +
                              $"\nTypes: {pokemon.PokemonType} - {pokemon.SecondaryType}" +
                              $"\nMove One: {pokemon.MoveOne} - Move Two: {pokemon.MoveTwo}" +
                              $"\nMove Three: {pokemon.MoveThree} - Move Four: {pokemon.MoveFour}");
            Console.WriteLine("Lets update this member of our team!" +
                              "\n\nPokemon Species Name: ");
            string species = Console.ReadLine();


            Console.WriteLine("Pokemon Nick Name: ");
            string name = Console.ReadLine();

            Console.WriteLine("Pokemon Level: ");
            string pokeLevel = Console.ReadLine()
            ;

            if (!pokeLevel.All(char.IsDigit))
            {
                Console.WriteLine("Pokemon Level must be whole numbers only!");
                Console.ReadKey();
            }
            else
            {
                int level = int.Parse(pokeLevel);
                Console.WriteLine("Pokemon Type: " +
                                  "\n1. Normal" +
                                  "\n2. Grass" +
                                  "\n3. Fire" +
                                  "\n4. Water" +
                                  "\n5. Electric" +
                                  "\n6. Ice" +
                                  "\n7. Bug" +
                                  "\n8. Ground" +
                                  "\n9. Rock" +
                                  "\n10. Fighting" +
                                  "\n11. Psychic" +
                                  "\n12. Ghost" +
                                  "\n13. Dark" +
                                  "\n14. Fairy" +
                                  "\n15. Dragon");
                TypeOfPokemon typeOne = (TypeOfPokemon)int.Parse(Console.ReadLine());
                Console.WriteLine("Pokemon Secondary Type: " +
                                  "\n1. Normal" +
                                  "\n2. Grass" +
                                  "\n3. Fire" +
                                  "\n4. Water" +
                                  "\n5. Electric" +
                                  "\n6. Ice" +
                                  "\n7. Bug" +
                                  "\n8. Ground" +
                                  "\n9. Rock" +
                                  "\n10. Fighting" +
                                  "\n11. Psychic" +
                                  "\n12. Ghost" +
                                  "\n13. Dark" +
                                  "\n14. Fairy" +
                                  "\n15. Dragon" +
                                  "\n16. None");
                TypeOfPokemon typeTwo = (TypeOfPokemon)int.Parse(Console.ReadLine());


                Console.WriteLine("Name of First Move: ");
                string moveOne = Console.ReadLine();
                Console.WriteLine("Name of Second Move: ");
                string moveTwo = Console.ReadLine();



                Console.WriteLine("Name of Third Move: ");
                string moveThree = Console.ReadLine();
                Console.WriteLine("Name of Fourth Move: ");
                string moveFour = Console.ReadLine();


                Pokemon newPokemon = new Pokemon(species, name, level, typeOne, typeTwo, moveOne, moveTwo, moveThree, moveFour);
                _repo.UpdatePokemonByTeamPosition(teamPosition, newPokemon);
                Console.WriteLine("Pokemon updated!");
                Console.ReadKey();
            }
            Console.Clear();
        }