Skip to content

State#

You can get the full current game state with /games/<game_id>/states or the game state after any action α with /games/<game_id>/states/α. Remember that 0 can be used to get the initial state of a game. The variant query parameter can be used to fetch a different variant than current. variant=0 will always be the same as not including the variant paramter.

{
  "game": {
    "id": "<game_id>",
    "name": "Ada's Fun Root Game",
    "state": "active",
    "seed": "<seed>",
    "created_by": "<player_ada_id>",
    "created_at": "2023-06-13T09:41:00+00:00",
    "actions": 1,
    "variants": 0,
  },
  "state": {...},
  "state_hash": "<sha_256_state_hash>",
}

The state field is fully game dependent and supports all valid JSON. The other fields are all generated by the API.