public static void RetireUsersPoke(int select, Pokemon[] sixPokemons, Pokemon[] usersPokes) { ControlPoke poke = new ControlPoke(); int catched = poke.Catched(); if (catched == 1) { Console.WriteLine("\nMala suerte, el oponente atrapo tu pokemon"); pokeCount++; usersPokes[select].Health = 150; sixPokemons[pokeCount] = usersPokes[select]; //Quitar el elemento del arreglo for (int i = 0; i <= userCount; i++) { if (usersPokes[i].Name == usersPokes[select].Name) { usersPokes[i] = null; break; } } } else { Console.WriteLine("\nTienenes suerte, el oponente no te quito tu pokemon"); usersPokes[select].Health = 150; } }
public static void RetireSixPoke(int random, Pokemon[] sixPokemons, Pokemon[] usersPokes) { ControlPoke poke = new ControlPoke(); int catched = poke.Catched(); if (catched == 1) { Console.WriteLine("\nFelicidades ganaste al pokemon"); userCount++; sixPokemons[random].Health = 150; usersPokes[userCount] = sixPokemons[random]; //Quitar el elemento del arreglo for (int i = 0; i <= pokeCount; i++) { if (sixPokemons[i].Name == sixPokemons[random].Name) { sixPokemons[i] = null; break; } } } else { Console.WriteLine("\nMala suerte, no pudiste atrapara al pokemon"); sixPokemons[random].Health = 150; } }