I am creating a browser game that allows players to fight monsters using Nodejs, Socket.io and Express. However I can't seem to figure out how to implement the turns of combat.
My train of thought and workflow is as follows:
The player declares an attack on a monster (
Clientmakes aPostrequest.) - WorkingThe
serverget's the player's stats as well as the monster's. - WorkingThe player selects his action and attacks, then it's the monster's turn and so on. - Can't figure this out
How would such a functionality be implemented?