// to catch all -> pokedex.catch(species = 1..pokemonCounts)
fun Pokedex.catch(species: IntRange) {
val reusableEntry = object : Pokedex.Entry {
override val isSeen: Boolean = true
override val isOwned: Boolean = true
override var speciesId: Int = 0
}
for (i in species) {
reusableEntry.speciesId = i
setEntry(reusableEntry)
}
}
// to see all -> pokedex.see(species = 1..pokemonCounts)
fun Pokedex.see(species: IntRange) {
val reusableEntry = object : Pokedex.Entry {
override val isSeen: Boolean = true
override var isOwned: Boolean = false
override var speciesId: Int = 0
}
for (i in species) {
reusableEntry.speciesId = i
reusableEntry.isOwned = getEntry(i).isOwned
setEntry(reusableEntry)
}
}