{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/209","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/209/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/209/events","html_url":"https://github.com/chrsmith/bwapi/issues/209","id":58824510,"number":209,"title":"whatBuilds ","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-24T23:33:57Z","updated_at":"2015-02-24T23:33:57Z","closed_at":"2015-02-24T23:33:57Z","body":"```\nAcquiring information on what units can be built seems wrong for a number\nof reasons:\n1. whatBuilds returns a pair containing a pointer and an integer that\ndescribes how many units can build a unit. that is different from what most\nother methods in BWAPI return, an STL container or similar. this sort of\nreturn value looks a lot like C-style and feels out of touch with the rest\nof BWAPI\n2. the documentation doesn't specify if the pointer is an array which\ncontains multiple objects or a pointer to a single object (even though the\ngame might not support the possibility of multiple units that can build one\nunit - is the game set of units extend-able?) \n3. instead of returning information on what a certain unit can do (in this\ncase build/train units), it returns information on passive characteristics\nof the unit. if you try to build any sort of enumerative approach on unit\nplanning, you will probably need to create a wrapper that can return\n\"whatCanThisUnitBuild\"\n\nthis isn't a bug in the implementation of anything, it's more of an opinion\nof what is in a design flaw\n```\n\n-----\nOriginal issue reported on code.google.com by `gajopetr...@gmail.com` on 6 Apr 2010 at 3:15"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75873540","html_url":"https://github.com/chrsmith/bwapi/issues/209#issuecomment-75873540","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/209","id":75873540,"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-24T23:33:57Z","updated_at":"2015-02-24T23:33:57Z","body":"```\nYeah. I forget why those functions return pointers to UnitTypes and TechTypes \nand\nUpgradeTypes. I think I wrote them like that because I thought you couldn't \nhave a\nUnitType function return a TechType object by value and vice versa with just \nforward\ndeclarations. I just tried that now and it works so it certainly makes sense to \njust\nreturn the actual UnitType/TechType/UpgradeType objects now rather than \npointers to them.\n```\n\n-----\nOriginal comment by `lowerlo...@gmail.com` on 8 May 2010 at 8:09\n* Changed state: **Accepted**"}}