Skip to content

isaacadams/pokemon-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokemon Utils

a collection of pokemon related utilities

use pokemon_utils::{self, is_rare, PokedexEntry};

fn main() {
    let pokemon = pokemon_utils::encounter_random_pokemon();
    // one way to convert pokemon index into an entry
    let _: &PokedexEntry = PokedexEntry::get_by_id(pokemon as usize).unwrap();
    // another way to do the conversion
    let entry: &PokedexEntry = pokemon.try_into().unwrap();
    println!("found a wild {}!", entry.name);
    println!("is rare? {}", is_rare(&entry.index));
}

Resources

About

various tools to help power any kind of pokemon related application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages