{"action":"created","comment":{"url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/comments/28649503","id":28649503,"diff_hunk":"@@ -0,0 +1,66 @@\n+# coding utf-8\n+class Lion:\n+    condition_ = 1  # 0 - сытый, 1 - голодный\n+    action_ = 0  # 0 - съесть, 1 - спать, 2 - бежать, 3 - смотреть\n+    __Array_ = [[[1, 1], [2, 1], [3, 1]], [[0, 0], [2, 1], [1, 1]]]\n+\n+    def __init__(self, condition):\n+        self.condition_ = condition\n+        # self.action_=action\n+\n+    def whoMet(self, whoMet):\n+        self.action_ = self.__Array_[self.condition_][whoMet][0]\n+        self.condition_ = self.__Array_[self.condition_][whoMet][1]\n+\n+    def getCondition(self):\n+        return self.condition_\n+\n+    def getAction(self):\n+        return self.action_\n+\n+    # var = Lion(1,1)\n+    # print(var.condition_,\" \",var.action_)\n+    #\n+    # var.whoMet(0)\n+    # print(var.condition_,\" \",var.action_)\n+\n+if __name__ == \"__main__\":\n+    condition = \" \"\n+    whoMeetLion = \" \"\n+    while condition != \"exit\" and whoMeetLion != \"exit\":\n+        print(\"Enter condition of your lion ('hungry' or 'full')\")\n+        condition = input()\n+        if (condition == 'full'):\n+             myLion = Lion(0)\n+        elif(condition == 'hungry'):\n+             myLion = Lion(1)","path":"Lion.py","position":36,"original_position":36,"commit_id":"28cba932b4291979657774ececb89f612986b69c","original_commit_id":"28cba932b4291979657774ececb89f612986b69c","user":{"login":"skyline-gleb","id":4970194,"avatar_url":"https://avatars.githubusercontent.com/u/4970194?v=3","gravatar_id":"","url":"https://api.github.com/users/skyline-gleb","html_url":"https://github.com/skyline-gleb","followers_url":"https://api.github.com/users/skyline-gleb/followers","following_url":"https://api.github.com/users/skyline-gleb/following{/other_user}","gists_url":"https://api.github.com/users/skyline-gleb/gists{/gist_id}","starred_url":"https://api.github.com/users/skyline-gleb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyline-gleb/subscriptions","organizations_url":"https://api.github.com/users/skyline-gleb/orgs","repos_url":"https://api.github.com/users/skyline-gleb/repos","events_url":"https://api.github.com/users/skyline-gleb/events{/privacy}","received_events_url":"https://api.github.com/users/skyline-gleb/received_events","type":"User","site_admin":false},"body":"правильнее делать так:\r\nif (condition == 'full'):\r\n    condition_index = 0\r\nelif(condition == 'hungry'):\r\n     condition_index = 1\r\nmyLion = Lion(condition_index, transition_table)","created_at":"2015-04-19T03:38:14Z","updated_at":"2015-04-19T03:38:14Z","html_url":"https://github.com/2gisprojectT/e.nidental/pull/1#discussion_r28649503","pull_request_url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/comments/28649503"},"html":{"href":"https://github.com/2gisprojectT/e.nidental/pull/1#discussion_r28649503"},"pull_request":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1","id":33564043,"html_url":"https://github.com/2gisprojectT/e.nidental/pull/1","diff_url":"https://github.com/2gisprojectT/e.nidental/pull/1.diff","patch_url":"https://github.com/2gisprojectT/e.nidental/pull/1.patch","issue_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/1","number":1,"state":"open","locked":false,"title":"Домашка про льва","user":{"login":"NidentalEgor","id":10388970,"avatar_url":"https://avatars.githubusercontent.com/u/10388970?v=3","gravatar_id":"","url":"https://api.github.com/users/NidentalEgor","html_url":"https://github.com/NidentalEgor","followers_url":"https://api.github.com/users/NidentalEgor/followers","following_url":"https://api.github.com/users/NidentalEgor/following{/other_user}","gists_url":"https://api.github.com/users/NidentalEgor/gists{/gist_id}","starred_url":"https://api.github.com/users/NidentalEgor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NidentalEgor/subscriptions","organizations_url":"https://api.github.com/users/NidentalEgor/orgs","repos_url":"https://api.github.com/users/NidentalEgor/repos","events_url":"https://api.github.com/users/NidentalEgor/events{/privacy}","received_events_url":"https://api.github.com/users/NidentalEgor/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-17T17:15:39Z","updated_at":"2015-04-19T03:38:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5759807abf3d1e1fe2e494803129b851e47b4937","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1/commits","review_comments_url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1/comments","review_comment_url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/comments{/number}","comments_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/1/comments","statuses_url":"https://api.github.com/repos/2gisprojectT/e.nidental/statuses/28cba932b4291979657774ececb89f612986b69c","head":{"label":"2gisprojectT:Lion","ref":"Lion","sha":"28cba932b4291979657774ececb89f612986b69c","user":{"login":"2gisprojectT","id":9006753,"avatar_url":"https://avatars.githubusercontent.com/u/9006753?v=3","gravatar_id":"","url":"https://api.github.com/users/2gisprojectT","html_url":"https://github.com/2gisprojectT","followers_url":"https://api.github.com/users/2gisprojectT/followers","following_url":"https://api.github.com/users/2gisprojectT/following{/other_user}","gists_url":"https://api.github.com/users/2gisprojectT/gists{/gist_id}","starred_url":"https://api.github.com/users/2gisprojectT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gisprojectT/subscriptions","organizations_url":"https://api.github.com/users/2gisprojectT/orgs","repos_url":"https://api.github.com/users/2gisprojectT/repos","events_url":"https://api.github.com/users/2gisprojectT/events{/privacy}","received_events_url":"https://api.github.com/users/2gisprojectT/received_events","type":"Organization","site_admin":false},"repo":{"id":32595886,"name":"e.nidental","full_name":"2gisprojectT/e.nidental","owner":{"login":"2gisprojectT","id":9006753,"avatar_url":"https://avatars.githubusercontent.com/u/9006753?v=3","gravatar_id":"","url":"https://api.github.com/users/2gisprojectT","html_url":"https://github.com/2gisprojectT","followers_url":"https://api.github.com/users/2gisprojectT/followers","following_url":"https://api.github.com/users/2gisprojectT/following{/other_user}","gists_url":"https://api.github.com/users/2gisprojectT/gists{/gist_id}","starred_url":"https://api.github.com/users/2gisprojectT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gisprojectT/subscriptions","organizations_url":"https://api.github.com/users/2gisprojectT/orgs","repos_url":"https://api.github.com/users/2gisprojectT/repos","events_url":"https://api.github.com/users/2gisprojectT/events{/privacy}","received_events_url":"https://api.github.com/users/2gisprojectT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gisprojectT/e.nidental","description":"","fork":false,"url":"https://api.github.com/repos/2gisprojectT/e.nidental","forks_url":"https://api.github.com/repos/2gisprojectT/e.nidental/forks","keys_url":"https://api.github.com/repos/2gisprojectT/e.nidental/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gisprojectT/e.nidental/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gisprojectT/e.nidental/teams","hooks_url":"https://api.github.com/repos/2gisprojectT/e.nidental/hooks","issue_events_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/events{/number}","events_url":"https://api.github.com/repos/2gisprojectT/e.nidental/events","assignees_url":"https://api.github.com/repos/2gisprojectT/e.nidental/assignees{/user}","branches_url":"https://api.github.com/repos/2gisprojectT/e.nidental/branches{/branch}","tags_url":"https://api.github.com/repos/2gisprojectT/e.nidental/tags","blobs_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gisprojectT/e.nidental/statuses/{sha}","languages_url":"https://api.github.com/repos/2gisprojectT/e.nidental/languages","stargazers_url":"https://api.github.com/repos/2gisprojectT/e.nidental/stargazers","contributors_url":"https://api.github.com/repos/2gisprojectT/e.nidental/contributors","subscribers_url":"https://api.github.com/repos/2gisprojectT/e.nidental/subscribers","subscription_url":"https://api.github.com/repos/2gisprojectT/e.nidental/subscription","commits_url":"https://api.github.com/repos/2gisprojectT/e.nidental/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gisprojectT/e.nidental/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gisprojectT/e.nidental/contents/{+path}","compare_url":"https://api.github.com/repos/2gisprojectT/e.nidental/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gisprojectT/e.nidental/merges","archive_url":"https://api.github.com/repos/2gisprojectT/e.nidental/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gisprojectT/e.nidental/downloads","issues_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues{/number}","pulls_url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls{/number}","milestones_url":"https://api.github.com/repos/2gisprojectT/e.nidental/milestones{/number}","notifications_url":"https://api.github.com/repos/2gisprojectT/e.nidental/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gisprojectT/e.nidental/labels{/name}","releases_url":"https://api.github.com/repos/2gisprojectT/e.nidental/releases{/id}","created_at":"2015-03-20T16:53:35Z","updated_at":"2015-03-20T16:54:16Z","pushed_at":"2015-04-17T17:15:39Z","git_url":"git://github.com/2gisprojectT/e.nidental.git","ssh_url":"git@github.com:2gisprojectT/e.nidental.git","clone_url":"https://github.com/2gisprojectT/e.nidental.git","svn_url":"https://github.com/2gisprojectT/e.nidental","homepage":null,"size":180,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"2gisprojectT:master","ref":"master","sha":"d6bab2c4889a8fb21c84a0c9a2bf959ac773f8cc","user":{"login":"2gisprojectT","id":9006753,"avatar_url":"https://avatars.githubusercontent.com/u/9006753?v=3","gravatar_id":"","url":"https://api.github.com/users/2gisprojectT","html_url":"https://github.com/2gisprojectT","followers_url":"https://api.github.com/users/2gisprojectT/followers","following_url":"https://api.github.com/users/2gisprojectT/following{/other_user}","gists_url":"https://api.github.com/users/2gisprojectT/gists{/gist_id}","starred_url":"https://api.github.com/users/2gisprojectT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gisprojectT/subscriptions","organizations_url":"https://api.github.com/users/2gisprojectT/orgs","repos_url":"https://api.github.com/users/2gisprojectT/repos","events_url":"https://api.github.com/users/2gisprojectT/events{/privacy}","received_events_url":"https://api.github.com/users/2gisprojectT/received_events","type":"Organization","site_admin":false},"repo":{"id":32595886,"name":"e.nidental","full_name":"2gisprojectT/e.nidental","owner":{"login":"2gisprojectT","id":9006753,"avatar_url":"https://avatars.githubusercontent.com/u/9006753?v=3","gravatar_id":"","url":"https://api.github.com/users/2gisprojectT","html_url":"https://github.com/2gisprojectT","followers_url":"https://api.github.com/users/2gisprojectT/followers","following_url":"https://api.github.com/users/2gisprojectT/following{/other_user}","gists_url":"https://api.github.com/users/2gisprojectT/gists{/gist_id}","starred_url":"https://api.github.com/users/2gisprojectT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gisprojectT/subscriptions","organizations_url":"https://api.github.com/users/2gisprojectT/orgs","repos_url":"https://api.github.com/users/2gisprojectT/repos","events_url":"https://api.github.com/users/2gisprojectT/events{/privacy}","received_events_url":"https://api.github.com/users/2gisprojectT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gisprojectT/e.nidental","description":"","fork":false,"url":"https://api.github.com/repos/2gisprojectT/e.nidental","forks_url":"https://api.github.com/repos/2gisprojectT/e.nidental/forks","keys_url":"https://api.github.com/repos/2gisprojectT/e.nidental/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gisprojectT/e.nidental/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gisprojectT/e.nidental/teams","hooks_url":"https://api.github.com/repos/2gisprojectT/e.nidental/hooks","issue_events_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/events{/number}","events_url":"https://api.github.com/repos/2gisprojectT/e.nidental/events","assignees_url":"https://api.github.com/repos/2gisprojectT/e.nidental/assignees{/user}","branches_url":"https://api.github.com/repos/2gisprojectT/e.nidental/branches{/branch}","tags_url":"https://api.github.com/repos/2gisprojectT/e.nidental/tags","blobs_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gisprojectT/e.nidental/statuses/{sha}","languages_url":"https://api.github.com/repos/2gisprojectT/e.nidental/languages","stargazers_url":"https://api.github.com/repos/2gisprojectT/e.nidental/stargazers","contributors_url":"https://api.github.com/repos/2gisprojectT/e.nidental/contributors","subscribers_url":"https://api.github.com/repos/2gisprojectT/e.nidental/subscribers","subscription_url":"https://api.github.com/repos/2gisprojectT/e.nidental/subscription","commits_url":"https://api.github.com/repos/2gisprojectT/e.nidental/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gisprojectT/e.nidental/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gisprojectT/e.nidental/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gisprojectT/e.nidental/contents/{+path}","compare_url":"https://api.github.com/repos/2gisprojectT/e.nidental/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gisprojectT/e.nidental/merges","archive_url":"https://api.github.com/repos/2gisprojectT/e.nidental/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gisprojectT/e.nidental/downloads","issues_url":"https://api.github.com/repos/2gisprojectT/e.nidental/issues{/number}","pulls_url":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls{/number}","milestones_url":"https://api.github.com/repos/2gisprojectT/e.nidental/milestones{/number}","notifications_url":"https://api.github.com/repos/2gisprojectT/e.nidental/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gisprojectT/e.nidental/labels{/name}","releases_url":"https://api.github.com/repos/2gisprojectT/e.nidental/releases{/id}","created_at":"2015-03-20T16:53:35Z","updated_at":"2015-03-20T16:54:16Z","pushed_at":"2015-04-17T17:15:39Z","git_url":"git://github.com/2gisprojectT/e.nidental.git","ssh_url":"git@github.com:2gisprojectT/e.nidental.git","clone_url":"https://github.com/2gisprojectT/e.nidental.git","svn_url":"https://github.com/2gisprojectT/e.nidental","homepage":null,"size":180,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1"},"html":{"href":"https://github.com/2gisprojectT/e.nidental/pull/1"},"issue":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/1"},"comments":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/2gisprojectT/e.nidental/statuses/28cba932b4291979657774ececb89f612986b69c"}}}}