public void Dispose() { if (MyTeam != null) { MyTeam.Clear(); } if (MyPokemons != null) { MyPokemons.Clear(); } if (OtherDefenders != null) { OtherDefenders.Clear(); } }
public void AddPokemon(ISession session, PokemonData pokemon, bool isMine = true) { if (isMine && MyPokemons.Any(a => a.Data.Id == pokemon.Id)) { return; } if (!isMine && OtherDefenders.Any(a => a.Data.Id == pokemon.Id)) { return; } if (isMine) { MyPokemons.Add(new MyPokemonStat(session, pokemon)); } else { OtherDefenders.Add(new AnyPokemonStat(session, pokemon)); } }