-
Notifications
You must be signed in to change notification settings - Fork 0
Create Game Request
To create a new go-man game you need to make a POST request to the /game url.
The server will create a new game instance and return a game object as below.
###Request HTTP POST
{
"Name":"Game name",
"MaxGoMenAllowed":1,
"MaxGoGhostsAllowed":4,
"WaitForPlayersSeconds": 60
}
###Response
{
"Id":"788a432740c8786d803120f6ddf7d3f8",
"Name":"Game name",
"PillsRemaining":214,
"Players":{},
"MaxGoMenAllowed":1,
"MaxGoGhostsAllowed":4,
"State":"new",
"PowerPillsActive":0,
"CreatedTime":"2013-08-08T22:07:35.436236384+01:00",
"LastUpdatedTime":"0001-01-01T00:00:00Z",
"GameStartTime":"2013-08-08T22:08:35.436236384+01:00",
"BoardCells":[[35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35],[35,46,46,46,46,46,46,46,46,46,46,46,46,35,35,46,46,46,46,46,46,46,46,46,46,46,46,35],[35,46,35,35,35,35,46,35,35,35,35,35,46,35,35,46,35,35,35,35,35,46,35,35,35,35,46,35],[35,80,35,35,35,35,46,35,35,35,35,35,46,35,35,46,35,35,35,35,35,46,35,35,35,35,80,35],[35,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,35],[35,46,35,35,35,35,46,35,35,46,35,35,35,35,35,35,35,35,46,35,35,46,35,35,35,35,46,35],[35,46,46,46,46,46,46,35,35,46,46,46,46,35,35,46,46,46,46,35,35,46,46,46,46,46,46,35],[35,35,35,35,35,35,46,35,35,35,35,35,32,35,35,32,35,35,35,35,35,46,35,35,35,35,35,35],[32,32,32,32,32,35,46,35,35,32,32,32,32,32,32,32,32,32,32,35,35,46,35,32,32,32,32,32],[32,32,32,32,32,35,46,35,35,32,35,35,35,45,45,35,35,35,32,35,35,46,35,32,32,32,32,32],[35,35,35,35,35,35,46,35,35,32,35,32,72,72,72,72,32,35,32,35,35,46,35,35,35,35,35,35],[32,32,32,32,32,32,46,32,32,32,35,32,72,72,72,72,32,35,32,32,32,46,32,32,32,32,32,32],[35,35,35,35,35,35,46,35,35,32,35,32,72,72,72,72,32,35,32,35,35,46,35,35,35,35,35,35],[32,32,32,32,32,35,46,35,35,32,35,35,35,35,35,35,35,35,32,35,35,46,35,32,32,32,32,32],[32,32,32,32,32,35,46,35,35,32,32,32,32,36,32,32,32,32,32,35,35,46,35,32,32,32,32,32],[35,35,35,35,35,35,46,35,35,32,35,35,35,35,35,35,35,35,32,35,35,46,35,35,35,35,35,35],[35,46,46,46,46,46,46,46,46,46,46,46,46,35,35,46,46,46,46,46,46,46,46,46,46,46,46,35],[35,46,35,35,35,35,46,35,35,35,35,35,46,35,35,46,35,35,35,35,35,46,35,35,35,35,46,35],[35,80,46,46,35,35,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,35,35,46,46,80,35],[35,35,35,46,35,35,46,35,35,46,35,35,35,35,35,35,35,35,46,35,35,46,35,35,46,35,35,35],[35,46,46,46,46,46,46,35,35,46,46,46,46,35,35,46,46,46,46,35,35,46,46,46,46,46,46,35],[35,46,35,35,35,35,35,35,35,35,35,35,46,35,35,46,35,35,35,35,35,35,35,35,35,35,46,35],[35,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,35],[35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35]]}
Id: game id used for all subsequent API calls for this game
Name: Name of game created
PillsRemaining: total number of uneaten pills
Players: Map of players, these get populated as players are added to the game
MaxGoMenAllowed: Max GoMen allowed in game, currently defaults to 1
MaxGoGhostsAllowed: Max GoGhosts in allowed in the game, currently defaults to 4
State: Game state
PowerPillsActive: integer to show number of powerpills currently active. Anything greater than 0 is active.
CreatedTime: Date/Time game created
LastUpdatedTime: Date/Time game last updated
GameStartTime: Date/Time when game will start. Game will wait until this time for players to join. If there are players missing at this time, CPU controlled players are added to game and the game begins.
BoardCells: 2d array of runes containing the cells on the game board