LAMaglan / PokeFightSimulator

A (simple) fight simulator between any two Pokemon using FastAPI with Jinja frontend
0 stars 0 forks source link

Fix battle #5

Closed LAMaglan closed 4 months ago

LAMaglan commented 4 months ago

Previously, get_pokemon only returned a dict, stats. Now, it returns a tuple: (stats, sprites, types)

This was not taken into account in the battle endpoint, which expected a dict. From

pokemon1_stats = await get_pokemon(pokemon1_name)
pokemon2_stats = await get_pokemon(pokemon2_name)    

To

pokemon1_stats, _, _ = await get_pokemon(pokemon1_name)
pokemon2_stats, _, _ = await get_pokemon(pokemon2_name)