This repository has been archived by the owner on Jun 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
GetGameState
enepomnyaschih edited this page Sep 13, 2010
·
16 revisions
Description
Provides dynamic information about specific game state (turn).
Method: GET
No cookies
Parameters
gameId | UID | Started game ID |
turn | Integer | Turn number to get information about. Defaults to current turn |
Success response
{ success: true, gameId: UID, turn: Integer, winnerIndex: Integer, // zero-based, -1 if undefined timeRemaining: Integer, // remaining time in ms players: [ // by slots { alive: Boolean, // whether player is playing here gold: Integer } ], provinces: [ { owner: Integer, units: [ Integer] // index - unit type, value - count of units, fortLevel: Integer, fortHealth: Integer } ] }
Possible error responses
Game with specified ID doesn’t exist:
{ success: false, errorId: "ERROR_INVALID_GAME_ID" }
Game turn doesn’t exist:
{ success: false, errorId: "ERROR_INVALID_TURN" }