Thrillberg / imperial

Imperial is a fun board game.
17 stars 6 forks source link

API method for retrieving game state #854

Open bertrandom opened 7 months ago

bertrandom commented 7 months ago

It'd be nice if there was an API method for retrieving the game state, in particular, whose turn it is.

e.g.

/api/game/:gameId

That returned the game state in JSON. Then folks could regularly poll this method (maybe once an hour?) to see if the player turn has changed and implement their own notifications.

Thrillberg commented 7 months ago

Hi @bertrandom ! 👋 Thanks for submitting this issue! I have absolutely nothing against such functionality and could possibly implement it myself if there were enough demand/interest in it. I'm not sure who else would make use of it at the moment. But if you want to implement, please feel free--I'd be happy to review any code you produce toward the effort!