This is a NodeJS API with express, typescript and objection ORM.
You can create a battle between 2 monsters through the endpoint
POST http://localhost:5000/battle
with the body { "monsterA": 3, "monsterB": 1 }
and in your application terminal you will see their life points in each confrontation turn like this:
in the end you will see which monster runs out of life points first.
https://github.com/AreViana/monsters-battle/blob/main/data/Monsters%20API.postman_collection.json