{"action":"opened","issue":{"url":"https://api.github.com/repos/CodeClub/python-curriculum/issues/77","repository_url":"https://api.github.com/repos/CodeClub/python-curriculum","labels_url":"https://api.github.com/repos/CodeClub/python-curriculum/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/CodeClub/python-curriculum/issues/77/comments","events_url":"https://api.github.com/repos/CodeClub/python-curriculum/issues/77/events","html_url":"https://github.com/CodeClub/python-curriculum/issues/77","id":177794700,"number":77,"title":"RPG: Replace room numbers with names.","user":{"login":"rik-cross","id":18461167,"avatar_url":"https://avatars.githubusercontent.com/u/18461167?v=3","gravatar_id":"","url":"https://api.github.com/users/rik-cross","html_url":"https://github.com/rik-cross","followers_url":"https://api.github.com/users/rik-cross/followers","following_url":"https://api.github.com/users/rik-cross/following{/other_user}","gists_url":"https://api.github.com/users/rik-cross/gists{/gist_id}","starred_url":"https://api.github.com/users/rik-cross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rik-cross/subscriptions","organizations_url":"https://api.github.com/users/rik-cross/orgs","repos_url":"https://api.github.com/users/rik-cross/repos","events_url":"https://api.github.com/users/rik-cross/events{/privacy}","received_events_url":"https://api.github.com/users/rik-cross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-19T14:08:25Z","updated_at":"2016-09-19T14:08:25Z","closed_at":null,"body":"In the RPG project, the rooms in the room dictionary are coded as numbers:\r\n\r\n```\r\n#a dictionary linking a room to other room positions\r\nrooms = {\r\n\r\n            1 : { 'name'  : 'Hall',\r\n                  'south' : 2\r\n                },\r\n\r\n            2 : { 'name'  : 'Kitchen',\r\n                  'north' : 1\r\n                }\r\n\r\n         }\r\n```\r\n\r\nI've just realised that there's no need for the rooms to be coded as numbers, and in fact using names would make the code clearer:\r\n\r\n```\r\n#a dictionary linking a room to other room positions\r\nrooms = {\r\n\r\n            'hall' : { 'name'  : 'Hall',\r\n                         'south' : 'kitchen'\r\n                },\r\n\r\n            'kitchen' : { 'name'  : 'Kitchen',\r\n                               'north' : 'hall'\r\n                }\r\n\r\n         }\r\n```"}}
{"actor":{"display_login":"rik-cross"}}