smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.77k stars 2.79k forks source link

Help: to understand the Sim library with more example uses #4591

Closed chakpongchung closed 6 years ago

chakpongchung commented 6 years ago

Here: https://github.com/Zarel/Pokemon-Showdown/tree/master/sim

I am looking for a simulator to play games in classroom. Ideally supporting 1v1, 2v2 and 3v3. 1v1 is enough for now though. But the starting point is to have a way to use the SIM with javascript so everyone can choose their move based on their predefined strategies.

One way to generate the examples I can think of:

Randomly generate 2 teams of 6 pokemons

For each Pokemon, before fainted, randomly pick a move or switch out each time.

Until the end of the game

Zarel commented 6 years ago

Done in 467b545496431fa4baa9e08357aabbce3a4722b7 and a1a88999ad51e90731007e1c900f9fde781afde2