A Pokémon battle engine written for the web