{"action":"opened","issue":{"url":"https://api.github.com/repos/gever/bwx-adventure/issues/24","labels_url":"https://api.github.com/repos/gever/bwx-adventure/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/gever/bwx-adventure/issues/24/comments","events_url":"https://api.github.com/repos/gever/bwx-adventure/issues/24/events","html_url":"https://github.com/gever/bwx-adventure/issues/24","id":53328461,"number":24,"title":"Crash on testing requirements","user":{"login":"mcapraro","id":418699,"avatar_url":"https://avatars.githubusercontent.com/u/418699?v=3","gravatar_id":"","url":"https://api.github.com/users/mcapraro","html_url":"https://github.com/mcapraro","followers_url":"https://api.github.com/users/mcapraro/followers","following_url":"https://api.github.com/users/mcapraro/following{/other_user}","gists_url":"https://api.github.com/users/mcapraro/gists{/gist_id}","starred_url":"https://api.github.com/users/mcapraro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcapraro/subscriptions","organizations_url":"https://api.github.com/users/mcapraro/orgs","repos_url":"https://api.github.com/users/mcapraro/repos","events_url":"https://api.github.com/users/mcapraro/events{/privacy}","received_events_url":"https://api.github.com/users/mcapraro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gever/bwx-adventure/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-04T07:24:12Z","updated_at":"2015-01-04T07:24:12Z","closed_at":null,"body":"there is a bug in the latest version when requirements are tested. in bwx-game.py, when you try and go into the elevator, which requires the pebble and the key, there is a crash:\r\n\r\n```\r\n\r\n        --=( You are in the Intersection )=--        \r\n\r\nA boring intersection. There is a passageway to the\r\nnorth that leads to the shop. To the east is the elevator\r\nlanding, to the west is the guest lounge, and to the\r\nsouth is the reception desk. There is nothing to do here.\r\n\r\n> go east\r\nTraceback (most recent call last):\r\n  File \"bwx-game.py\", line 310, in <module>\r\n    my_game.run(update)\r\n  File \"/home/ubuntu/workspace/advent.py\", line 417, in run\r\n    if f( actor, noun, words ):\r\n  File \"/home/ubuntu/workspace/advent.py\", line 658, in act_go1\r\n    if loc == None:\r\n  File \"/home/ubuntu/workspace/advent.py\", line 511, in go\r\n    if set(c.point_b.requirements).issubset(set(self.hero.inventory)):\r\nAttributeError: 'Location' object has no attribute 'hero'\r\n```\r\n\r\nit seems with the refactoring, we lost a reference to hero in location. should Location have a reference to the Game object? then it would be able to find hero through self.game. hero, or is there a better way to get the hero from the Location instance?"}}