{"action":"created","comment":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/comments/199887181","pull_request_review_id":134063234,"id":199887181,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTg4NzE4MQ==","diff_hunk":"@@ -0,0 +1,47 @@\n+def is_valid(x, y, grid):\n+    \"\"\" Checks whether position x, y exists in the grid and whether it is a land tile.\n+\n+    :param x: integer for the row of the tile\n+    :param y: integer for the column of the tile\n+    :param grid: the map of islands and water represented as a list of lists\n+    :return: True is the tile matches the conditions, False if not\n+    \"\"\"\n+    return (x >= 0) and (x < len(grid)) and (y >= 0) and (y < len(grid[0])) and (grid[x][y] == \"T\")\n+\n+\n+def dfs(grid, i, j, visited):\n+    \"\"\" Implements depth first search for every neighbour (excluding the diagonal neighbours) if they`re land and not\n+    visited.\n+\n+    :param grid: the map of islands and water represented as a list of lists\n+    :param i: integer for the row of the tile\n+    :param j: integer for the column of the tile\n+    :param visited: a list of lists containing only True or False values. True if the tile has been visited, False if not\n+    \"\"\"\n+    visited[i][j] = True\n+    if is_valid(i-1, j, grid) and not visited[i-1][j]:","path":"avgustinagr/assignment4/Task.py","position":22,"original_position":22,"commit_id":"db9db3cb582d4bd047e9f4fcc233a27234bd27b8","original_commit_id":"db9db3cb582d4bd047e9f4fcc233a27234bd27b8","user":{"login":"ferreron","id":20680398,"node_id":"MDQ6VXNlcjIwNjgwMzk4","avatar_url":"https://avatars0.githubusercontent.com/u/20680398?v=4","gravatar_id":"","url":"https://api.github.com/users/ferreron","html_url":"https://github.com/ferreron","followers_url":"https://api.github.com/users/ferreron/followers","following_url":"https://api.github.com/users/ferreron/following{/other_user}","gists_url":"https://api.github.com/users/ferreron/gists{/gist_id}","starred_url":"https://api.github.com/users/ferreron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferreron/subscriptions","organizations_url":"https://api.github.com/users/ferreron/orgs","repos_url":"https://api.github.com/users/ferreron/repos","events_url":"https://api.github.com/users/ferreron/events{/privacy}","received_events_url":"https://api.github.com/users/ferreron/received_events","type":"User","site_admin":false},"body":"Maybe a little loop rather than repeating the code 4 times? Think that now my follow-up question could be \"now you can consider diagonal neighbors as well\" ;-)","created_at":"2018-07-03T17:16:22Z","updated_at":"2018-07-03T17:20:26Z","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/25#discussion_r199887181","pull_request_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/comments/199887181"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/25#discussion_r199887181"},"pull_request":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25","id":198999977,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4OTk5OTc3","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/25","diff_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/25.diff","patch_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/25.patch","issue_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/25","number":25,"state":"open","locked":false,"title":"Avgustinagr 4","user":{"login":"Avgustinagr","id":24685517,"node_id":"MDQ6VXNlcjI0Njg1NTE3","avatar_url":"https://avatars0.githubusercontent.com/u/24685517?v=4","gravatar_id":"","url":"https://api.github.com/users/Avgustinagr","html_url":"https://github.com/Avgustinagr","followers_url":"https://api.github.com/users/Avgustinagr/followers","following_url":"https://api.github.com/users/Avgustinagr/following{/other_user}","gists_url":"https://api.github.com/users/Avgustinagr/gists{/gist_id}","starred_url":"https://api.github.com/users/Avgustinagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Avgustinagr/subscriptions","organizations_url":"https://api.github.com/users/Avgustinagr/orgs","repos_url":"https://api.github.com/users/Avgustinagr/repos","events_url":"https://api.github.com/users/Avgustinagr/events{/privacy}","received_events_url":"https://api.github.com/users/Avgustinagr/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-03T15:21:12Z","updated_at":"2018-07-03T17:20:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b8d0b9e7b1b740bf2d17d90eb6445a457d6d619","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25/commits","review_comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25/comments","review_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/25/comments","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/statuses/db9db3cb582d4bd047e9f4fcc233a27234bd27b8","head":{"label":"flerdacodeu:avgustinagr-4","ref":"avgustinagr-4","sha":"db9db3cb582d4bd047e9f4fcc233a27234bd27b8","user":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"repo":{"id":133326659,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMzMjY2NTk=","name":"CodeU-2018-Group8","full_name":"flerdacodeu/CodeU-2018-Group8","owner":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group8","description":null,"fork":false,"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8","forks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/forks","keys_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/teams","hooks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/hooks","issue_events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/events{/number}","events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/events","assignees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/assignees{/user}","branches_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/branches{/branch}","tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/tags","blobs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/refs{/sha}","trees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/statuses/{sha}","languages_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/languages","stargazers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/stargazers","contributors_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/contributors","subscribers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/subscribers","subscription_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/subscription","commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/commits{/sha}","git_commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/commits{/sha}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/comments{/number}","issue_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/comments{/number}","contents_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/contents/{+path}","compare_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/merges","archive_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/downloads","issues_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues{/number}","pulls_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls{/number}","milestones_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/milestones{/number}","notifications_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/labels{/name}","releases_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/releases{/id}","deployments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/deployments","created_at":"2018-05-14T08:07:14Z","updated_at":"2018-07-03T15:19:50Z","pushed_at":"2018-07-03T15:21:13Z","git_url":"git://github.com/flerdacodeu/CodeU-2018-Group8.git","ssh_url":"git@github.com:flerdacodeu/CodeU-2018-Group8.git","clone_url":"https://github.com/flerdacodeu/CodeU-2018-Group8.git","svn_url":"https://github.com/flerdacodeu/CodeU-2018-Group8","homepage":null,"size":142,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"flerdacodeu:master","ref":"master","sha":"b5c28bbdc015ef2a0d958cd8656b3559f510c18e","user":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"repo":{"id":133326659,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMzMjY2NTk=","name":"CodeU-2018-Group8","full_name":"flerdacodeu/CodeU-2018-Group8","owner":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group8","description":null,"fork":false,"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8","forks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/forks","keys_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/teams","hooks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/hooks","issue_events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/events{/number}","events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/events","assignees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/assignees{/user}","branches_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/branches{/branch}","tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/tags","blobs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/refs{/sha}","trees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/statuses/{sha}","languages_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/languages","stargazers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/stargazers","contributors_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/contributors","subscribers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/subscribers","subscription_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/subscription","commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/commits{/sha}","git_commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/git/commits{/sha}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/comments{/number}","issue_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/comments{/number}","contents_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/contents/{+path}","compare_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/merges","archive_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/downloads","issues_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues{/number}","pulls_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls{/number}","milestones_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/milestones{/number}","notifications_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/labels{/name}","releases_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/releases{/id}","deployments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/deployments","created_at":"2018-05-14T08:07:14Z","updated_at":"2018-07-03T15:19:50Z","pushed_at":"2018-07-03T15:21:13Z","git_url":"git://github.com/flerdacodeu/CodeU-2018-Group8.git","ssh_url":"git@github.com:flerdacodeu/CodeU-2018-Group8.git","clone_url":"https://github.com/flerdacodeu/CodeU-2018-Group8.git","svn_url":"https://github.com/flerdacodeu/CodeU-2018-Group8","homepage":null,"size":142,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/25"},"issue":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/25"},"comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/statuses/db9db3cb582d4bd047e9f4fcc233a27234bd27b8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ferreron"}}