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

GetGameReplay

enepomnyaschih edited this page Sep 13, 2010 · 2 revisions

Method: GET

No cookies

Parameters

gameId UID Finished game ID

Success response

{
  success: true,  gameId: UID,
  gameName: String,
  winnerIndex: Integer (zero-based),
  players: [
    {
      memberId: String,
      gold: Integer (initial)
    }
  ],
  landscape: String (coded matrix),
  provinces: [
    {
      nearProvinces: [ Integer ],
      owner: Integer,
      income: Integer,
      recruits: [ Integer ] (index - recruit undex, value - unit type),
      units: [ Integer] (index - unit type, value - count of units),
      fortLevel: Integer,
      fortHealth: Integer
    }
  ],
  rivers: [
    {
      sideLeft: Integer,
      sideRight: Integer
    }
  ],
  turns: [
    {
      orders: [
        {
          type: "Move",
          provinceFrom: Integer,
          provinceTo: Integer,
          units: [ Integer ] (index – unit type, value – count of units)
        },
        {
          type: "Attack",
          provinceFrom: Integer,
          provinceTo: Integer,
          units: [ Integer ] (index – unit type, value – count of units)
        },
        {
          type: "Train",
          province: Integer,
          units: [ Integer ] (index – unit type, value – count of units)
        },
        {
          type: "Build",
          province: Integer
        }
      ] (sorted by properties in order, like here),
      battles: [
        {
          type: "Boundary",
          provinceIndex1: Integer (provinceIndex1 < provinceIndex2),
          provinceIndex2: Integer,
          winnerIndex: Integer,
          unitsRemaining: [ Integer ] (index – unit type, value – count of units)
        }, {
          type: "Attack",
          province: Integer,
          winnerIndex: Integer,
          unitsRemaining: [ Integer ] (index – unit type, value – count of units)
        }
      ] (sorted by properties in order, like here)
    }
  ]
}
Clone this wiki locally