Properties:
Name | Type | Attributes | Description |
---|---|---|---|
action |
string | "player_move" or "game_over" | |
game |
string | prefix for localStorage and server database entries | |
move_count |
integer | used to id messages to the server so turns aren't inadvertantly skipped | |
state |
Array |
<optional> |
player_move to tell server the current state. |
move |
Object |
<optional> |
player_move selected by human player, eg {"red": ["move", "a", 1, "b", 2]} or {"red": "noop"} |
init |
Array |
<optional> |
starting state stored in localStorage to update server utilities |
moves |
Array.<Object> |
<optional> |
array of moves to provide history of a game played to completion. |
goal |
Object |
<optional> |
didn't simply call this utility to distinguish from non terminal state values. |
- Source: