{"action":"created","issue":{"url":"https://api.github.com/repos/kheaactua/diplomacy-engine/issues/3","labels_url":"https://api.github.com/repos/kheaactua/diplomacy-engine/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/kheaactua/diplomacy-engine/issues/3/comments","events_url":"https://api.github.com/repos/kheaactua/diplomacy-engine/issues/3/events","html_url":"https://github.com/kheaactua/diplomacy-engine/issues/3","id":80931522,"number":3,"title":"Game Sequence","user":{"login":"kheaactua","id":2363406,"avatar_url":"https://avatars.githubusercontent.com/u/2363406?v=3","gravatar_id":"","url":"https://api.github.com/users/kheaactua","html_url":"https://github.com/kheaactua","followers_url":"https://api.github.com/users/kheaactua/followers","following_url":"https://api.github.com/users/kheaactua/following{/other_user}","gists_url":"https://api.github.com/users/kheaactua/gists{/gist_id}","starred_url":"https://api.github.com/users/kheaactua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kheaactua/subscriptions","organizations_url":"https://api.github.com/users/kheaactua/orgs","repos_url":"https://api.github.com/users/kheaactua/repos","events_url":"https://api.github.com/users/kheaactua/events{/privacy}","received_events_url":"https://api.github.com/users/kheaactua/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kheaactua/diplomacy-engine/labels/Discussion","name":"Discussion","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"gobyrne","id":2494551,"avatar_url":"https://avatars.githubusercontent.com/u/2494551?v=3","gravatar_id":"","url":"https://api.github.com/users/gobyrne","html_url":"https://github.com/gobyrne","followers_url":"https://api.github.com/users/gobyrne/followers","following_url":"https://api.github.com/users/gobyrne/following{/other_user}","gists_url":"https://api.github.com/users/gobyrne/gists{/gist_id}","starred_url":"https://api.github.com/users/gobyrne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gobyrne/subscriptions","organizations_url":"https://api.github.com/users/gobyrne/orgs","repos_url":"https://api.github.com/users/gobyrne/repos","events_url":"https://api.github.com/users/gobyrne/events{/privacy}","received_events_url":"https://api.github.com/users/gobyrne/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-05-26T12:02:52Z","updated_at":"2015-05-27T03:38:57Z","closed_at":null,"body":"We go:\r\n```\r\nSpring -> Retreat -> Fall -> Retreat -> New Supply ->\r\n```\r\n\r\nEvery time you call `/matches/resolves`, I will return you a `ResolutionResult` object.  It will look like:\r\n\r\nEverything is good:\r\n```json\r\n\"data\": {\r\n   \"code\": 0,\r\n   \"status\": \"Success\",\r\n   \"retreats_required\": [],\r\n}\r\n```\r\n\r\nRetreats required\r\n```json\r\n\"data\": {\r\n   \"code\": 1,\r\n   \"status\": \"Retreats Required\",\r\n   \"retreats_required\": [\r\n      {\r\n         \"territory\": {\r\n            // Territory structure with neighbours\r\n         },\r\n         \"loser\": {\r\n            // Empire structure\r\n         },\r\n         \"winner\": {\r\n            // Empire structure\r\n         }\r\n      }\r\n      // ...\r\n   ],\r\n}\r\n```\r\n\r\nSupply\r\n```json\r\n\"data\": {\r\n   \"code\": 2,\r\n   \"status\": \"Supply changes\",\r\n   \"changes\": [\r\n      {\r\n         \"empire-supply\": {\r\n            \"empire\": {\r\n                // Empire structure\r\n            },\r\n            \"supplies\": 4, // number of supplies\r\n            \"unit-count\": 5, // number of units\r\n         },\r\n      }\r\n      // ...\r\n   ],\r\n}\r\n```\r\n\r\n@gobyrne Thoughts?  Each of these that have a `code != 0` will require the interface to seek input.  One thought I had is that it might be easier for you to be able to subsequently request empire (player) specific data.  If so, I can probably accommodate this, but it would be more work.. The reason is is that I don't store this result, it's only generated on order resolutions."},"comment":{"url":"https://api.github.com/repos/kheaactua/diplomacy-engine/issues/comments/105743878","html_url":"https://github.com/kheaactua/diplomacy-engine/issues/3#issuecomment-105743878","issue_url":"https://api.github.com/repos/kheaactua/diplomacy-engine/issues/3","id":105743878,"user":{"login":"kheaactua","id":2363406,"avatar_url":"https://avatars.githubusercontent.com/u/2363406?v=3","gravatar_id":"","url":"https://api.github.com/users/kheaactua","html_url":"https://github.com/kheaactua","followers_url":"https://api.github.com/users/kheaactua/followers","following_url":"https://api.github.com/users/kheaactua/following{/other_user}","gists_url":"https://api.github.com/users/kheaactua/gists{/gist_id}","starred_url":"https://api.github.com/users/kheaactua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kheaactua/subscriptions","organizations_url":"https://api.github.com/users/kheaactua/orgs","repos_url":"https://api.github.com/users/kheaactua/repos","events_url":"https://api.github.com/users/kheaactua/events{/privacy}","received_events_url":"https://api.github.com/users/kheaactua/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T03:38:57Z","updated_at":"2015-05-27T03:38:57Z","body":"K, I have an example of a real result.  I'll update this if there any any errors\r\n\r\n```json\r\n{\r\n  \"turn-id\": 70,\r\n  \"next-turn-id\": 71,\r\n  \"orders\": [{\r\n    \"empire\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"command\": \"[Red       ] MOVE (L)A-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Green (e3)\"],\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"command\": \"[Red       ] SUPPORT Red (W)F-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Green (e3)\"],\r\n    \"ally\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"command\": \"[Green     ] MOVE (C)I-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Red (e4)\"],\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"command\": \"[Green     ] SUPPORT Green (W)H-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Red (e4)\"],\r\n    \"ally\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }],\r\n  \"required-retreats\": [],\r\n  \"unit-supply\": [{\r\n    \"empire\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"owned\": 2,\r\n    \"occupied-army\": 0\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 113,\r\n      \"abbr\": \"BLU\",\r\n      \"name\": \"The Blue Imperium\",\r\n      \"name_long\": \"Blue Forces\",\r\n      \"name_short\": \"Blue\"\r\n    },\r\n    \"owned\": 1,\r\n    \"occupied-army\": 0\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"owned\": 3,\r\n    \"occupied-army\": 0\r\n  }]\r\n}\r\n\r\n\r\n\r\n{\r\n  \"turn-id\": 70,\r\n  \"next-turn-id\": 71,\r\n  \"orders\": [{\r\n    \"empire\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"command\": \"[Red       ] MOVE (L)A-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Green (e3)\"],\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"command\": \"[Red       ] SUPPORT Red (W)F-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Green (e3)\"],\r\n    \"ally\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"command\": \"[Green     ] MOVE (C)I-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Red (e4)\"],\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"command\": \"[Green     ] SUPPORT Green (W)H-(L)B\",\r\n    \"transcript\": [\"Lost in stalemate to Red (e4)\"],\r\n    \"ally\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"dest\": {\r\n      \"territory_id\": 335,\r\n      \"name\": \"B\",\r\n      \"type\": \"land\",\r\n      \"is_supply\": \"1\"\r\n    }\r\n  }],\r\n  \"required-retreats\": [],\r\n  \"unit-supply\": [{\r\n    \"empire\": {\r\n      \"empire_id\": 112,\r\n      \"abbr\": \"RED\",\r\n      \"name\": \"The Red Imperium\",\r\n      \"name_long\": \"Red Forces\",\r\n      \"name_short\": \"Red\"\r\n    },\r\n    \"owned\": 2,\r\n    \"occupied-army\": 0\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 113,\r\n      \"abbr\": \"BLU\",\r\n      \"name\": \"The Blue Imperium\",\r\n      \"name_long\": \"Blue Forces\",\r\n      \"name_short\": \"Blue\"\r\n    },\r\n    \"owned\": 1,\r\n    \"occupied-army\": 0\r\n  }, {\r\n    \"empire\": {\r\n      \"empire_id\": 114,\r\n      \"abbr\": \"GRN\",\r\n      \"name\": \"The Green Imperium\",\r\n      \"name_long\": \"Green Forces\",\r\n      \"name_short\": \"Green\"\r\n    },\r\n    \"owned\": 3,\r\n    \"occupied-army\": 0\r\n  }]\r\n}\r\n```\r\n\r\nSeem alright, @gobyrne "}}