public void SetPokemonAsFainted(IPokemon pokemon) { var foundPokemon = PokemonTeam.FirstOrDefault(fd => fd.Pokemon == pokemon); if (foundPokemon != null) { foundPokemon.Fainted = true; } }
public IPokemon GetNextAvailablePokemon() { IPokemon firstAvailablePokemon = PokemonTeam.FirstOrDefault(pkmn => !pkmn.Fainted)?.Pokemon; if (firstAvailablePokemon != null) { SetPokemonAsCurrent(firstAvailablePokemon); } return(firstAvailablePokemon); }
public IPokemon GetCurrentPokemon() => PokemonTeam.FirstOrDefault(pkmn => pkmn.Current)?.Pokemon;