Open
Description
(Excerpt from #29.)
Server should provide HTTP API capable of:
-
register a new game
-
query game list
-
join a game
- When joining the game, server sends to the client a game key that should be used to schedule turns and query the game state.
-
schedule the game turn
- When scheduling a turn, each client sends to the server their shot power and direction parameters.
- When all the players in a game have been scheduled their turns, server simultaneously performs the turns.
-
query the state of the game
- When the client queries the game state, server sends the game map and the shot/direction history for each player. Shot information also contains a coordinates where the shot has been exploded and information whether any of players was hit by the collision.
-
Each game should have a round timeout. If any of the clients haven't scheduled their turn in time, their shooting phase should be skipped.