Skip to content
This repository has been archived by the owner on Jun 28, 2020. It is now read-only.

GetGameInfo

enepomnyaschih edited this page Sep 13, 2010 · 14 revisions

Description

Provides static and initial information about game.

Method: GET

Cookies

ticket [optional] Valid user ticket

Parameters

gameId UID Proper game ID

Success response

{
  success: true,
  gameId: UID,
  gameName: String,
  turnDuration: Integer,
  isStarted: Boolean, // true if started or finished
  isJoined: Boolean, // if ticket is specified and game is not finished, then means whether current member is joined to this game
  winnerIndex: Integer, // zero-based, -1 if game is not finished
  turnCount: Integer, // total turn count
  players: [
    null,    // if slot is free
    {        // if slot is busy
      memberId: String
    }
  ], // length of this array is equal to total player count
  mapWidth: Integer,
  mapHeight: Integer,
  landscape: String, // coded matrix, null if game is not started
  provinces: [ // null if game is not started
    {
      nearProvinces: Array of Integer, // zero-based
      income: Integer,
      recruits: Array of Integer // index - recruit number, value - unit type
    }
  ]
}
Clone this wiki locally