{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/161","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/161/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/161/events","html_url":"https://github.com/chrsmith/bwapi/issues/161","id":58521079,"number":161,"title":"Enemy Start Location not Correct","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-22T21:42:23Z","updated_at":"2015-02-22T21:42:23Z","closed_at":null,"body":"```\nEnemy start location is reported incorrectly.  I have only tested this on\nthree two player maps.\n\nIt can be replicated with the following code:\nBroodwar->sendText(\"Number of start locations: %d\", startLocs.size());\nfor each (TilePosition tilePos in startLocs)\n{\n  Broodwar->sendText(\"Start location: (%d, %d)\", tilePos.x(), tilePos.y());\n}\nBroodwar->sendText(\"Our start location: (%d, %d)\",\nBroodwar->self()->getStartLocation().x(),\nBroodwar->self()->getStartLocation().y());\nBroodwar->sendText(\"Enemy start location: (%d, %d)\",\nBroodwar->enemy()->getStartLocation().x(),\nBroodwar->enemy()->getStartLocation().y());\n\nOn two player maps \"Our start location\" equals one of the \"Start\nlocation\"s, but \"Enemy start location\" does not equal the other \"Start\nlocation\".\n\nI expected the enemy start location to be identical to the start location\nthat is not the same as my start location in the array of start locations :)\n\nI am using BWAPI 2.4 beta.\n\nThis is my first report so please be kind if I have not done enough testing\nor it is an issue with my setup/system.\n\nThanks!\n```\n\n-----\nOriginal issue reported on code.google.com by `banknoti...@gmail.com` on 6 Dec 2009 at 1:37"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75462834","html_url":"https://github.com/chrsmith/bwapi/issues/161#issuecomment-75462834","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/161","id":75462834,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T21:42:23Z","updated_at":"2015-02-22T21:42:23Z","body":"```\nI did not have complete map information enabled.\n\nI was assuming that the object returned by enemy() would just report a possible \nstart\nlocation if complete map information was turned off.  But it makes sense for it \nto\nreturn undefined if complete information is turned off and the player be forced \nto\nguess it with scouting and a list of possible map start locations.\n\nPerhaps the documentation could be modified to say that the getstartlocation \nfunction\nwill return undefined if called from ->enemy and complete map information was \noff?\n\nThanks for clarifying!  My bad.\n```\n\n-----\nOriginal comment by `banknoti...@gmail.com` on 7 Dec 2009 at 3:56"}}