pokestat 0.1.1

guess a pokemon's IVs and EVs from in-game information
Documentation
//! database of pokemon stats

use crate::Stats;

const BASE_STAT_TABLE: &[(&str, [u16; 6])] = &include!("../data/base_stats.rs");

/// get the base stats of a pokemon from their name.
///
/// all pokemon up to gen 9 are known.
pub fn get_base_stats(pokemon: &str) -> Option<Stats> {
	// TODO: convert pokemon name to lower case
	let lname = pokemon.to_lowercase();
	for (k, v) in BASE_STAT_TABLE {
		if *k == lname {
			return Some(Stats(v.clone()));
		}
	}
	None
}