Skip to content

Instantly share code, notes, and snippets.

@eguven
Created October 23, 2016 22:08
Show Gist options
  • Save eguven/43cf61e1e84ade308aa4301ea78cad88 to your computer and use it in GitHub Desktop.
Save eguven/43cf61e1e84ade308aa4301ea78cad88 to your computer and use it in GitHub Desktop.
an example gamestate json from mobai
{
"player_id": 0,
"turn": 0,
"map": [
[{
"occupants": [{
"target": null,
"hit": 1,
"posy": 0,
"type": "Fort",
"vision": 3,
"attack": 5,
"health": 150,
"player": 0,
"action_points": 1,
"id": "715b1676-f49f-43c7-b88a-ee0fc933a3c0",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 0,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "34e6444b-e9e6-4bf0-896f-af90d0cad1b4",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 0,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "c8035543-3079-44c0-88bb-913a0d0b7b5f",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 0,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "34322ff0-cb95-4ee0-9a36-a2b08d601f7c",
"posx": 0
}],
"posy": 0,
"posx": 0
}, {
"occupants": [],
"posy": 0,
"posx": 1
}, {
"occupants": [],
"posy": 0,
"posx": 2
}, {
"occupants": [],
"posy": 0,
"posx": 3
}, {
"occupants": [],
"posy": 0,
"posx": 4
}, {
"occupants": [],
"posy": 0,
"posx": 5
}, {
"occupants": [],
"posy": 0,
"posx": 6
}, {
"occupants": [],
"posy": 0,
"posx": 7
}, {
"occupants": [],
"posy": 0,
"posx": 8
}, {
"occupants": [],
"posy": 0,
"posx": 9
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 0,
"type": "Tower",
"vision": 2,
"attack": 5,
"health": 100,
"player": 0,
"action_points": 1,
"id": "7e17233c-b1e8-4abd-85bc-cc30f636be95",
"posx": 10
}],
"posy": 0,
"posx": 10
}, {
"occupants": [],
"posy": 0,
"posx": 11
}, {
"occupants": [],
"posy": 0,
"posx": 12
}, {
"occupants": [],
"posy": 0,
"posx": 13
}, {
"occupants": [],
"posy": 0,
"posx": 14
}, {
"occupants": [],
"posy": 0,
"posx": 15
}, {
"occupants": [],
"posy": 0,
"posx": 16
}, {
"occupants": [],
"posy": 0,
"posx": 17
}, {
"occupants": [],
"posy": 0,
"posx": 18
}, {
"occupants": [],
"posy": 0,
"posx": 19
}, {
"occupants": [],
"posy": 0,
"posx": 20
}, {
"occupants": [],
"posy": 0,
"posx": 21
}, {
"occupants": [],
"posy": 0,
"posx": 22
}, {
"occupants": [],
"posy": 0,
"posx": 23
}, {
"occupants": [],
"posy": 0,
"posx": 24
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 0,
"type": "Tower",
"vision": 2,
"attack": 5,
"health": 100,
"player": 1,
"action_points": 1,
"id": "e4ab6385-bdc5-4f32-bbd5-37949426d5eb",
"posx": 25
}],
"posy": 0,
"posx": 25
}, {
"occupants": [],
"posy": 0,
"posx": 26
}, {
"occupants": [],
"posy": 0,
"posx": 27
}, {
"occupants": [],
"posy": 0,
"posx": 28
}, {
"occupants": [],
"posy": 0,
"posx": 29
}, {
"occupants": [],
"posy": 0,
"posx": 30
}, {
"occupants": [],
"posy": 0,
"posx": 31
}, {
"occupants": [],
"posy": 0,
"posx": 32
}, {
"occupants": [],
"posy": 0,
"posx": 33
}, {
"occupants": [],
"posy": 0,
"posx": 34
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 0,
"type": "Fort",
"vision": 3,
"attack": 5,
"health": 150,
"player": 1,
"action_points": 1,
"id": "c6ada151-e554-4eda-a708-b0f22c578d6e",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 0,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "10160117-f610-4524-a1f4-f22166391826",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 0,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "2b392233-289b-48de-8d7f-241b8bcd335a",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 0,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "59b96f9c-9f3b-4141-8211-b833b14b30b6",
"posx": 35
}],
"posy": 0,
"posx": 35
}],
[{
"occupants": [],
"posy": 1,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 1,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 1,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 1,
"posx": 35
}],
[{
"occupants": [],
"posy": 2,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 2,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 2,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 2,
"posx": 35
}],
[{
"occupants": [],
"posy": 3,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 3,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 3,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 3,
"posx": 35
}],
[{
"occupants": [],
"posy": 4,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 4,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 4,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 4,
"posx": 35
}],
[{
"occupants": [],
"posy": 5,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 5,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 5,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 5,
"posx": 35
}],
[{
"occupants": [],
"posy": 6,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 6,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 6,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 6,
"posx": 35
}],
[{
"occupants": [],
"posy": 7,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 7,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 7,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 7,
"posx": 35
}],
[{
"occupants": [],
"posy": 8,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 8,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 8,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 8,
"posx": 35
}],
[{
"occupants": [],
"posy": 9,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 9,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 9,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 9,
"posx": 35
}],
[{
"occupants": [{
"target": null,
"hit": 1,
"posy": 10,
"type": "Fort",
"vision": 3,
"attack": 5,
"health": 150,
"player": 0,
"action_points": 1,
"id": "3d912ef4-627a-44f0-8856-23cf83bfcec2",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 10,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "00482fab-d44c-4472-9aa7-dab5c13fab6c",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 10,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "a423bdf3-613d-47d5-b327-6a2765cc41f6",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 10,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "cf8ec10c-18e8-4de7-921e-43434dd5c701",
"posx": 0
}],
"posy": 10,
"posx": 0
}, {
"occupants": [],
"posy": 10,
"posx": 1
}, {
"occupants": [],
"posy": 10,
"posx": 2
}, {
"occupants": [],
"posy": 10,
"posx": 3
}, {
"occupants": [],
"posy": 10,
"posx": 4
}, {
"occupants": [],
"posy": 10,
"posx": 5
}, {
"occupants": [],
"posy": 10,
"posx": 6
}, {
"occupants": [],
"posy": 10,
"posx": 7
}, {
"occupants": [],
"posy": 10,
"posx": 8
}, {
"occupants": [],
"posy": 10,
"posx": 9
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 10,
"type": "Tower",
"vision": 2,
"attack": 5,
"health": 100,
"player": 0,
"action_points": 1,
"id": "257ba70b-a834-4c08-9235-c6ab5010deaf",
"posx": 10
}],
"posy": 10,
"posx": 10
}, {
"occupants": [],
"posy": 10,
"posx": 11
}, {
"occupants": [],
"posy": 10,
"posx": 12
}, {
"occupants": [],
"posy": 10,
"posx": 13
}, {
"occupants": [],
"posy": 10,
"posx": 14
}, {
"occupants": [],
"posy": 10,
"posx": 15
}, {
"occupants": [],
"posy": 10,
"posx": 16
}, {
"occupants": [],
"posy": 10,
"posx": 17
}, {
"occupants": [],
"posy": 10,
"posx": 18
}, {
"occupants": [],
"posy": 10,
"posx": 19
}, {
"occupants": [],
"posy": 10,
"posx": 20
}, {
"occupants": [],
"posy": 10,
"posx": 21
}, {
"occupants": [],
"posy": 10,
"posx": 22
}, {
"occupants": [],
"posy": 10,
"posx": 23
}, {
"occupants": [],
"posy": 10,
"posx": 24
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 10,
"type": "Tower",
"vision": 2,
"attack": 5,
"health": 100,
"player": 1,
"action_points": 1,
"id": "defe33df-110a-46ea-9dd4-bc92e715b17e",
"posx": 25
}],
"posy": 10,
"posx": 25
}, {
"occupants": [],
"posy": 10,
"posx": 26
}, {
"occupants": [],
"posy": 10,
"posx": 27
}, {
"occupants": [],
"posy": 10,
"posx": 28
}, {
"occupants": [],
"posy": 10,
"posx": 29
}, {
"occupants": [],
"posy": 10,
"posx": 30
}, {
"occupants": [],
"posy": 10,
"posx": 31
}, {
"occupants": [],
"posy": 10,
"posx": 32
}, {
"occupants": [],
"posy": 10,
"posx": 33
}, {
"occupants": [],
"posy": 10,
"posx": 34
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 10,
"type": "Fort",
"vision": 3,
"attack": 5,
"health": 150,
"player": 1,
"action_points": 1,
"id": "3d106b4b-cb9d-4646-bc22-1ddb2b90f519",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 10,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "280ebc29-0d10-4d22-a481-d68deff51148",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 10,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "c2d44835-0abc-4f74-b691-d0f53312dddd",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 10,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "3e924c93-0a4a-45b0-80e8-632e9a4371cf",
"posx": 35
}],
"posy": 10,
"posx": 35
}],
[{
"occupants": [],
"posy": 11,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 11,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 11,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 11,
"posx": 35
}],
[{
"occupants": [],
"posy": 12,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 12,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 12,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 12,
"posx": 35
}],
[{
"occupants": [],
"posy": 13,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 13,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 13,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 13,
"posx": 35
}],
[{
"occupants": [],
"posy": 14,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 14,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 14,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 14,
"posx": 35
}],
[{
"occupants": [],
"posy": 15,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 15,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 15,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 15,
"posx": 35
}],
[{
"occupants": [],
"posy": 16,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 16,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 16,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 16,
"posx": 35
}],
[{
"occupants": [],
"posy": 17,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 17,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 17,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 17,
"posx": 35
}],
[{
"occupants": [],
"posy": 18,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 18,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 18,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 18,
"posx": 35
}],
[{
"occupants": [],
"posy": 19,
"posx": 0
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 19,
"posx": 10
}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 19,
"posx": 25
}, null, null, null, null, null, null, null, null, null, {
"occupants": [],
"posy": 19,
"posx": 35
}],
[{
"occupants": [{
"target": null,
"hit": 1,
"posy": 20,
"type": "Fort",
"vision": 3,
"attack": 5,
"health": 150,
"player": 0,
"action_points": 1,
"id": "cc9a8a1c-7fda-4896-bf78-4ffe7d291ba3",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 20,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "ecc671d6-5f76-4f7f-a1f9-85d2a203196e",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 20,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "7e0e40a3-ede6-470e-a3bb-045ef3771d93",
"posx": 0
}, {
"target": null,
"hit": 1,
"posy": 20,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 0,
"path": [],
"action_points": 1,
"id": "43e765ee-6ec0-4585-92ef-111b8ae5fd52",
"posx": 0
}],
"posy": 20,
"posx": 0
}, {
"occupants": [],
"posy": 20,
"posx": 1
}, {
"occupants": [],
"posy": 20,
"posx": 2
}, {
"occupants": [],
"posy": 20,
"posx": 3
}, {
"occupants": [],
"posy": 20,
"posx": 4
}, {
"occupants": [],
"posy": 20,
"posx": 5
}, {
"occupants": [],
"posy": 20,
"posx": 6
}, {
"occupants": [],
"posy": 20,
"posx": 7
}, {
"occupants": [],
"posy": 20,
"posx": 8
}, {
"occupants": [],
"posy": 20,
"posx": 9
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 20,
"type": "Tower",
"vision": 2,
"attack": 5,
"health": 100,
"player": 0,
"action_points": 1,
"id": "7914f450-d023-4ed0-b012-db98a50071e8",
"posx": 10
}],
"posy": 20,
"posx": 10
}, {
"occupants": [],
"posy": 20,
"posx": 11
}, {
"occupants": [],
"posy": 20,
"posx": 12
}, {
"occupants": [],
"posy": 20,
"posx": 13
}, {
"occupants": [],
"posy": 20,
"posx": 14
}, {
"occupants": [],
"posy": 20,
"posx": 15
}, {
"occupants": [],
"posy": 20,
"posx": 16
}, {
"occupants": [],
"posy": 20,
"posx": 17
}, {
"occupants": [],
"posy": 20,
"posx": 18
}, {
"occupants": [],
"posy": 20,
"posx": 19
}, {
"occupants": [],
"posy": 20,
"posx": 20
}, {
"occupants": [],
"posy": 20,
"posx": 21
}, {
"occupants": [],
"posy": 20,
"posx": 22
}, {
"occupants": [],
"posy": 20,
"posx": 23
}, {
"occupants": [],
"posy": 20,
"posx": 24
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 20,
"type": "Tower",
"vision": 2,
"attack": 5,
"health": 100,
"player": 1,
"action_points": 1,
"id": "59ef62ef-d288-4035-ab5d-c7a3ccaeb999",
"posx": 25
}],
"posy": 20,
"posx": 25
}, {
"occupants": [],
"posy": 20,
"posx": 26
}, {
"occupants": [],
"posy": 20,
"posx": 27
}, {
"occupants": [],
"posy": 20,
"posx": 28
}, {
"occupants": [],
"posy": 20,
"posx": 29
}, {
"occupants": [],
"posy": 20,
"posx": 30
}, {
"occupants": [],
"posy": 20,
"posx": 31
}, {
"occupants": [],
"posy": 20,
"posx": 32
}, {
"occupants": [],
"posy": 20,
"posx": 33
}, {
"occupants": [],
"posy": 20,
"posx": 34
}, {
"occupants": [{
"target": null,
"hit": 1,
"posy": 20,
"type": "Fort",
"vision": 3,
"attack": 5,
"health": 150,
"player": 1,
"action_points": 1,
"id": "d820cd08-4586-4222-917c-fe034be5096f",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 20,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "88f999a9-6058-4227-9307-4ac98850c7d5",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 20,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "a7505a9e-b441-4740-ac91-4e0861aedc7c",
"posx": 35
}, {
"target": null,
"hit": 1,
"posy": 20,
"type": "Soldier",
"vision": 2,
"attack": 1,
"health": 3,
"player": 1,
"path": [],
"action_points": 1,
"id": "8abc60ad-a3dc-4f9b-8401-c678dcee887c",
"posx": 35
}],
"posy": 20,
"posx": 35
}]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment