Empires Game Protocol
=====================
-Version: 0.3
+Version: 0.4
For a specific game the following API endpoints are defined.
(Note: Only the trailing portion of the API URI is provided here.
event: player-leave
data: {"id":3}
+ TYPE: game-state
+
+ WHEN: When client first connects and whenever game state changes
+
+ VALUES: Game state will be one of the following:
+
+ JOIN: Players are choosing characters and joining the game
+ REVEAL: Character names are being revealed to players
+ CAPTURE: Players are guessing characters in capture attempts
+
+ EXAMPLE:
+
+ event: game-state
+ data: {"state":"REVEAL"}
+
+ TYPE: character-reveal
+
+ WHEN: Periodically during the REVEAL state of the game
+
+ EXAMPLE:
+
+ event: character-reveal
+ data: {"character":"Albert Einstein"}
+
TYPE: capture
WHEN: When one player captures another
Behavior: Removes an existing player with the given ID
+/reveal
+
+ Method: POST
+
+ When: Only valid when in game state of JOIN
+
+ Behavior: Change state to REVEAL; reveal character names to all clienta
+
+/start
+
+ Method: POST
+
+ When: Only valid when in game state of REVEAL
+
+ Behavior: Change game state to CAPTURE
+
/reset
Method: POST