{"action":"created","comment":{"url":"https://api.github.com/repos/hecoding/Pac-Man/pulls/comments/109519389","pull_request_review_id":30627509,"id":109519389,"diff_hunk":"@@ -2311,6 +2339,31 @@ public int getGeometricMeanDistanceToEdibleGhosts(int pacmanLocation)\n \t\treturn result.intValue();\n \t}\n \t\n+\t/**\n+\t * direction moves modified to avoid jam situations\n+\t * returns direction on junctions\n+\t * returns direction on tunnels if direction is a possible move\n+\t * returns last move on tunnels if direction it's not a possible move\n+\t */\n+\tpublic MOVE getSmartmove(int pacmanLocation, MOVE direction) {\n+\t\t\n+\t\tif (isJunction(pacmanLocation))\t\t//returns direction on junctions\n+\t\t\treturn direction;\n+\t\telse if (getNeighbour(pacmanLocation, direction) != -1)\t\t//returns direction on tunnels if direction is a possible move\n+\t\t\treturn direction;\n+\t\telse {\t\t//returns last move on tunnels if direction it's not a possible move\n+\t\t\tif (getNeighbour(pacmanLocation, getPacmanLastMoveMade()) != -1)\t\t// 'I' tunnel\n+\t\t\t\treturn getPacmanLastMoveMade();\n+\t\t\telse if (getNeighbour(pacmanLocation, getPacmanLastMoveMade().L90()) != -1)\t// 'L' tunnel 90º left\n+\t\t\t\treturn getPacmanLastMoveMade().L90();\n+\t\t\telse if (getNeighbour(pacmanLocation, getPacmanLastMoveMade().R90()) != -1)\t// 'L' tunnel 90º right\n+\t\t\t\treturn getPacmanLastMoveMade().R90();\n+\t\t\telse\n+\t\t\t\treturn MOVE.NEUTRAL;\t//unknown situation","path":"src/pacman/game/Game.java","position":75,"original_position":75,"commit_id":"5578b7908b6e59161d10a27c3ecbc358b83ef501","original_commit_id":"5578b7908b6e59161d10a27c3ecbc358b83ef501","user":{"login":"J-888","id":11405820,"avatar_url":"https://avatars2.githubusercontent.com/u/11405820?v=3","gravatar_id":"","url":"https://api.github.com/users/J-888","html_url":"https://github.com/J-888","followers_url":"https://api.github.com/users/J-888/followers","following_url":"https://api.github.com/users/J-888/following{/other_user}","gists_url":"https://api.github.com/users/J-888/gists{/gist_id}","starred_url":"https://api.github.com/users/J-888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/J-888/subscriptions","organizations_url":"https://api.github.com/users/J-888/orgs","repos_url":"https://api.github.com/users/J-888/repos","events_url":"https://api.github.com/users/J-888/events{/privacy}","received_events_url":"https://api.github.com/users/J-888/received_events","type":"User","site_admin":false},"body":"La idea de esto es ayudar a pacman a girar en esquinas, si volvemos hacia atrás no se consigue nada","created_at":"2017-04-03T20:42:07Z","updated_at":"2017-04-03T20:42:07Z","html_url":"https://github.com/hecoding/Pac-Man/pull/41#discussion_r109519389","pull_request_url":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/hecoding/Pac-Man/pulls/comments/109519389"},"html":{"href":"https://github.com/hecoding/Pac-Man/pull/41#discussion_r109519389"},"pull_request":{"href":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41","id":113821825,"html_url":"https://github.com/hecoding/Pac-Man/pull/41","diff_url":"https://github.com/hecoding/Pac-Man/pull/41.diff","patch_url":"https://github.com/hecoding/Pac-Man/pull/41.patch","issue_url":"https://api.github.com/repos/hecoding/Pac-Man/issues/41","number":41,"state":"open","locked":false,"title":"Gamefunctions fixes","user":{"login":"J-888","id":11405820,"avatar_url":"https://avatars2.githubusercontent.com/u/11405820?v=3","gravatar_id":"","url":"https://api.github.com/users/J-888","html_url":"https://github.com/J-888","followers_url":"https://api.github.com/users/J-888/followers","following_url":"https://api.github.com/users/J-888/following{/other_user}","gists_url":"https://api.github.com/users/J-888/gists{/gist_id}","starred_url":"https://api.github.com/users/J-888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/J-888/subscriptions","organizations_url":"https://api.github.com/users/J-888/orgs","repos_url":"https://api.github.com/users/J-888/repos","events_url":"https://api.github.com/users/J-888/events{/privacy}","received_events_url":"https://api.github.com/users/J-888/received_events","type":"User","site_admin":false},"body":"fixes for issue #31 & naive implementation of smart moves","created_at":"2017-04-02T15:11:20Z","updated_at":"2017-04-03T20:42:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f88488635ec3e329ff8e8d9093c2f1b4bb8adefc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41/commits","review_comments_url":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41/comments","review_comment_url":"https://api.github.com/repos/hecoding/Pac-Man/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hecoding/Pac-Man/issues/41/comments","statuses_url":"https://api.github.com/repos/hecoding/Pac-Man/statuses/5578b7908b6e59161d10a27c3ecbc358b83ef501","head":{"label":"hecoding:gamefunctions","ref":"gamefunctions","sha":"5578b7908b6e59161d10a27c3ecbc358b83ef501","user":{"login":"hecoding","id":7122387,"avatar_url":"https://avatars2.githubusercontent.com/u/7122387?v=3","gravatar_id":"","url":"https://api.github.com/users/hecoding","html_url":"https://github.com/hecoding","followers_url":"https://api.github.com/users/hecoding/followers","following_url":"https://api.github.com/users/hecoding/following{/other_user}","gists_url":"https://api.github.com/users/hecoding/gists{/gist_id}","starred_url":"https://api.github.com/users/hecoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hecoding/subscriptions","organizations_url":"https://api.github.com/users/hecoding/orgs","repos_url":"https://api.github.com/users/hecoding/repos","events_url":"https://api.github.com/users/hecoding/events{/privacy}","received_events_url":"https://api.github.com/users/hecoding/received_events","type":"User","site_admin":false},"repo":{"id":61569137,"name":"Pac-Man","full_name":"hecoding/Pac-Man","owner":{"login":"hecoding","id":7122387,"avatar_url":"https://avatars2.githubusercontent.com/u/7122387?v=3","gravatar_id":"","url":"https://api.github.com/users/hecoding","html_url":"https://github.com/hecoding","followers_url":"https://api.github.com/users/hecoding/followers","following_url":"https://api.github.com/users/hecoding/following{/other_user}","gists_url":"https://api.github.com/users/hecoding/gists{/gist_id}","starred_url":"https://api.github.com/users/hecoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hecoding/subscriptions","organizations_url":"https://api.github.com/users/hecoding/orgs","repos_url":"https://api.github.com/users/hecoding/repos","events_url":"https://api.github.com/users/hecoding/events{/privacy}","received_events_url":"https://api.github.com/users/hecoding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hecoding/Pac-Man","description":"Evolutionary bot (undergraduate thesis)","fork":false,"url":"https://api.github.com/repos/hecoding/Pac-Man","forks_url":"https://api.github.com/repos/hecoding/Pac-Man/forks","keys_url":"https://api.github.com/repos/hecoding/Pac-Man/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hecoding/Pac-Man/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hecoding/Pac-Man/teams","hooks_url":"https://api.github.com/repos/hecoding/Pac-Man/hooks","issue_events_url":"https://api.github.com/repos/hecoding/Pac-Man/issues/events{/number}","events_url":"https://api.github.com/repos/hecoding/Pac-Man/events","assignees_url":"https://api.github.com/repos/hecoding/Pac-Man/assignees{/user}","branches_url":"https://api.github.com/repos/hecoding/Pac-Man/branches{/branch}","tags_url":"https://api.github.com/repos/hecoding/Pac-Man/tags","blobs_url":"https://api.github.com/repos/hecoding/Pac-Man/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hecoding/Pac-Man/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hecoding/Pac-Man/git/refs{/sha}","trees_url":"https://api.github.com/repos/hecoding/Pac-Man/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hecoding/Pac-Man/statuses/{sha}","languages_url":"https://api.github.com/repos/hecoding/Pac-Man/languages","stargazers_url":"https://api.github.com/repos/hecoding/Pac-Man/stargazers","contributors_url":"https://api.github.com/repos/hecoding/Pac-Man/contributors","subscribers_url":"https://api.github.com/repos/hecoding/Pac-Man/subscribers","subscription_url":"https://api.github.com/repos/hecoding/Pac-Man/subscription","commits_url":"https://api.github.com/repos/hecoding/Pac-Man/commits{/sha}","git_commits_url":"https://api.github.com/repos/hecoding/Pac-Man/git/commits{/sha}","comments_url":"https://api.github.com/repos/hecoding/Pac-Man/comments{/number}","issue_comment_url":"https://api.github.com/repos/hecoding/Pac-Man/issues/comments{/number}","contents_url":"https://api.github.com/repos/hecoding/Pac-Man/contents/{+path}","compare_url":"https://api.github.com/repos/hecoding/Pac-Man/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hecoding/Pac-Man/merges","archive_url":"https://api.github.com/repos/hecoding/Pac-Man/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hecoding/Pac-Man/downloads","issues_url":"https://api.github.com/repos/hecoding/Pac-Man/issues{/number}","pulls_url":"https://api.github.com/repos/hecoding/Pac-Man/pulls{/number}","milestones_url":"https://api.github.com/repos/hecoding/Pac-Man/milestones{/number}","notifications_url":"https://api.github.com/repos/hecoding/Pac-Man/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hecoding/Pac-Man/labels{/name}","releases_url":"https://api.github.com/repos/hecoding/Pac-Man/releases{/id}","deployments_url":"https://api.github.com/repos/hecoding/Pac-Man/deployments","created_at":"2016-06-20T18:02:46Z","updated_at":"2017-01-08T06:05:58Z","pushed_at":"2017-04-03T19:56:39Z","git_url":"git://github.com/hecoding/Pac-Man.git","ssh_url":"git@github.com:hecoding/Pac-Man.git","clone_url":"https://github.com/hecoding/Pac-Man.git","svn_url":"https://github.com/hecoding/Pac-Man","homepage":"","size":18739,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"hecoding:master","ref":"master","sha":"c154026137d3783b74d2f7677806a1434ef7fe07","user":{"login":"hecoding","id":7122387,"avatar_url":"https://avatars2.githubusercontent.com/u/7122387?v=3","gravatar_id":"","url":"https://api.github.com/users/hecoding","html_url":"https://github.com/hecoding","followers_url":"https://api.github.com/users/hecoding/followers","following_url":"https://api.github.com/users/hecoding/following{/other_user}","gists_url":"https://api.github.com/users/hecoding/gists{/gist_id}","starred_url":"https://api.github.com/users/hecoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hecoding/subscriptions","organizations_url":"https://api.github.com/users/hecoding/orgs","repos_url":"https://api.github.com/users/hecoding/repos","events_url":"https://api.github.com/users/hecoding/events{/privacy}","received_events_url":"https://api.github.com/users/hecoding/received_events","type":"User","site_admin":false},"repo":{"id":61569137,"name":"Pac-Man","full_name":"hecoding/Pac-Man","owner":{"login":"hecoding","id":7122387,"avatar_url":"https://avatars2.githubusercontent.com/u/7122387?v=3","gravatar_id":"","url":"https://api.github.com/users/hecoding","html_url":"https://github.com/hecoding","followers_url":"https://api.github.com/users/hecoding/followers","following_url":"https://api.github.com/users/hecoding/following{/other_user}","gists_url":"https://api.github.com/users/hecoding/gists{/gist_id}","starred_url":"https://api.github.com/users/hecoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hecoding/subscriptions","organizations_url":"https://api.github.com/users/hecoding/orgs","repos_url":"https://api.github.com/users/hecoding/repos","events_url":"https://api.github.com/users/hecoding/events{/privacy}","received_events_url":"https://api.github.com/users/hecoding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hecoding/Pac-Man","description":"Evolutionary bot (undergraduate thesis)","fork":false,"url":"https://api.github.com/repos/hecoding/Pac-Man","forks_url":"https://api.github.com/repos/hecoding/Pac-Man/forks","keys_url":"https://api.github.com/repos/hecoding/Pac-Man/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hecoding/Pac-Man/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hecoding/Pac-Man/teams","hooks_url":"https://api.github.com/repos/hecoding/Pac-Man/hooks","issue_events_url":"https://api.github.com/repos/hecoding/Pac-Man/issues/events{/number}","events_url":"https://api.github.com/repos/hecoding/Pac-Man/events","assignees_url":"https://api.github.com/repos/hecoding/Pac-Man/assignees{/user}","branches_url":"https://api.github.com/repos/hecoding/Pac-Man/branches{/branch}","tags_url":"https://api.github.com/repos/hecoding/Pac-Man/tags","blobs_url":"https://api.github.com/repos/hecoding/Pac-Man/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hecoding/Pac-Man/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hecoding/Pac-Man/git/refs{/sha}","trees_url":"https://api.github.com/repos/hecoding/Pac-Man/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hecoding/Pac-Man/statuses/{sha}","languages_url":"https://api.github.com/repos/hecoding/Pac-Man/languages","stargazers_url":"https://api.github.com/repos/hecoding/Pac-Man/stargazers","contributors_url":"https://api.github.com/repos/hecoding/Pac-Man/contributors","subscribers_url":"https://api.github.com/repos/hecoding/Pac-Man/subscribers","subscription_url":"https://api.github.com/repos/hecoding/Pac-Man/subscription","commits_url":"https://api.github.com/repos/hecoding/Pac-Man/commits{/sha}","git_commits_url":"https://api.github.com/repos/hecoding/Pac-Man/git/commits{/sha}","comments_url":"https://api.github.com/repos/hecoding/Pac-Man/comments{/number}","issue_comment_url":"https://api.github.com/repos/hecoding/Pac-Man/issues/comments{/number}","contents_url":"https://api.github.com/repos/hecoding/Pac-Man/contents/{+path}","compare_url":"https://api.github.com/repos/hecoding/Pac-Man/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hecoding/Pac-Man/merges","archive_url":"https://api.github.com/repos/hecoding/Pac-Man/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hecoding/Pac-Man/downloads","issues_url":"https://api.github.com/repos/hecoding/Pac-Man/issues{/number}","pulls_url":"https://api.github.com/repos/hecoding/Pac-Man/pulls{/number}","milestones_url":"https://api.github.com/repos/hecoding/Pac-Man/milestones{/number}","notifications_url":"https://api.github.com/repos/hecoding/Pac-Man/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hecoding/Pac-Man/labels{/name}","releases_url":"https://api.github.com/repos/hecoding/Pac-Man/releases{/id}","deployments_url":"https://api.github.com/repos/hecoding/Pac-Man/deployments","created_at":"2016-06-20T18:02:46Z","updated_at":"2017-01-08T06:05:58Z","pushed_at":"2017-04-03T19:56:39Z","git_url":"git://github.com/hecoding/Pac-Man.git","ssh_url":"git@github.com:hecoding/Pac-Man.git","clone_url":"https://github.com/hecoding/Pac-Man.git","svn_url":"https://github.com/hecoding/Pac-Man","homepage":"","size":18739,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41"},"html":{"href":"https://github.com/hecoding/Pac-Man/pull/41"},"issue":{"href":"https://api.github.com/repos/hecoding/Pac-Man/issues/41"},"comments":{"href":"https://api.github.com/repos/hecoding/Pac-Man/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/hecoding/Pac-Man/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hecoding/Pac-Man/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/hecoding/Pac-Man/statuses/5578b7908b6e59161d10a27c3ecbc358b83ef501"}}}}
{"actor":{"display_login":"J-888"}}