summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
748f60b)
Specifically, we change to lowercase names for the states, and we also
include both the old and new states on each transition. This also
means there is a new "none" state for the initial game-state event.
Empires Game Protocol
=====================
Empires Game Protocol
=====================
For a specific game the following API endpoints are defined.
(Note: Only the trailing portion of the API URI is provided here.
For a specific game the following API endpoints are defined.
(Note: Only the trailing portion of the API URI is provided here.
WHEN: When client first connects and whenever game state changes
WHEN: When client first connects and whenever game state changes
- VALUES: Game state will be one of the following:
+ VALUES: Event gives both the old and new state. Game state
+ Each 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
+ none: Pseudo-state used as old_state when game is started
+ 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
+ EXAMPLES:
+
+ event: game-state
+ data: {"old_state":"none","new_state":"join"}
- data: {"state":"REVEAL"}
+ data: {"old_state":"join","new_state":"reveal"}
- WHEN: Periodically during the REVEAL state of the game
+ WHEN: Periodically during the "reveal" state of the game