{"action":"created","comment":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/comments/203068565","pull_request_review_id":137885537,"id":203068565,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzA2ODU2NQ==","diff_hunk":"@@ -0,0 +1,75 @@\n+#Using Python 3\n+import collections\n+\n+def count_islands(maps):\n+    \"\"\"\n+    Function to loop over the map to find all islands.\n+\n+    Arguments:\n+        maps: The grid map of islands and water.\n+\n+    Returns:\n+        num_islands: An int that is the number of islands on the map.\n+    \"\"\"\n+    num_islands = 0\n+\n+    for row in range(len(maps)):\n+        for col in range(len(maps[0])):\n+            if maps[row][col]:\n+                num_islands += 1\n+                find_land(maps, row, col)\n+\n+    return num_islands\n+\n+\n+def neighbours(maps, row, col):","path":"cliodhnaharrison/assignment4/counting_islands.py","position":25,"original_position":25,"commit_id":"69656fb6a725a9169a2836e143d44f22514362a8","original_commit_id":"69656fb6a725a9169a2836e143d44f22514362a8","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":"What about passing the number of rows and the number of cols instead of the map? You do not need the entire map, only the dimensions.","created_at":"2018-07-17T15:27:41Z","updated_at":"2018-07-17T15:31:57Z","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/30#discussion_r203068565","pull_request_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/comments/203068565"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/30#discussion_r203068565"},"pull_request":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30","id":201327633,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMzI3NjMz","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/30","diff_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/30.diff","patch_url":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/30.patch","issue_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/30","number":30,"state":"open","locked":false,"title":"Assignment 4 Submission","user":{"login":"cliodhnaharrison","id":15262401,"node_id":"MDQ6VXNlcjE1MjYyNDAx","avatar_url":"https://avatars0.githubusercontent.com/u/15262401?v=4","gravatar_id":"","url":"https://api.github.com/users/cliodhnaharrison","html_url":"https://github.com/cliodhnaharrison","followers_url":"https://api.github.com/users/cliodhnaharrison/followers","following_url":"https://api.github.com/users/cliodhnaharrison/following{/other_user}","gists_url":"https://api.github.com/users/cliodhnaharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/cliodhnaharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliodhnaharrison/subscriptions","organizations_url":"https://api.github.com/users/cliodhnaharrison/orgs","repos_url":"https://api.github.com/users/cliodhnaharrison/repos","events_url":"https://api.github.com/users/cliodhnaharrison/events{/privacy}","received_events_url":"https://api.github.com/users/cliodhnaharrison/received_events","type":"User","site_admin":false},"body":"Assumptions:\r\n\r\n1. Map is uniform, same number of values in each row and same number of values in each column.\r\n2. No other value than True or False appears in grid.\r\n3. Original map can be mutated, this makes keeping track of visited cells easier. Could create a duplication of the original map if it is better to not mutate the original grid but this saves on memory.","created_at":"2018-07-13T15:37:36Z","updated_at":"2018-07-17T15:31:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"297c79966766b472d55e70ed3679b4bb42fbd15f","assignee":{"login":"cliodhnaharrison","id":15262401,"node_id":"MDQ6VXNlcjE1MjYyNDAx","avatar_url":"https://avatars0.githubusercontent.com/u/15262401?v=4","gravatar_id":"","url":"https://api.github.com/users/cliodhnaharrison","html_url":"https://github.com/cliodhnaharrison","followers_url":"https://api.github.com/users/cliodhnaharrison/followers","following_url":"https://api.github.com/users/cliodhnaharrison/following{/other_user}","gists_url":"https://api.github.com/users/cliodhnaharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/cliodhnaharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliodhnaharrison/subscriptions","organizations_url":"https://api.github.com/users/cliodhnaharrison/orgs","repos_url":"https://api.github.com/users/cliodhnaharrison/repos","events_url":"https://api.github.com/users/cliodhnaharrison/events{/privacy}","received_events_url":"https://api.github.com/users/cliodhnaharrison/received_events","type":"User","site_admin":false},"assignees":[{"login":"cliodhnaharrison","id":15262401,"node_id":"MDQ6VXNlcjE1MjYyNDAx","avatar_url":"https://avatars0.githubusercontent.com/u/15262401?v=4","gravatar_id":"","url":"https://api.github.com/users/cliodhnaharrison","html_url":"https://github.com/cliodhnaharrison","followers_url":"https://api.github.com/users/cliodhnaharrison/followers","following_url":"https://api.github.com/users/cliodhnaharrison/following{/other_user}","gists_url":"https://api.github.com/users/cliodhnaharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/cliodhnaharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliodhnaharrison/subscriptions","organizations_url":"https://api.github.com/users/cliodhnaharrison/orgs","repos_url":"https://api.github.com/users/cliodhnaharrison/repos","events_url":"https://api.github.com/users/cliodhnaharrison/events{/privacy}","received_events_url":"https://api.github.com/users/cliodhnaharrison/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30/commits","review_comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30/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/30/comments","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/statuses/69656fb6a725a9169a2836e143d44f22514362a8","head":{"label":"flerdacodeu:cliodhnaharrison-assignment4","ref":"cliodhnaharrison-assignment4","sha":"69656fb6a725a9169a2836e143d44f22514362a8","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-14T21:40:53Z","pushed_at":"2018-07-16T19:28:35Z","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":170,"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":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"flerdacodeu:master","ref":"master","sha":"893ae3f77d24c3b102b03f992d262db32b2f0f98","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-14T21:40:53Z","pushed_at":"2018-07-16T19:28:35Z","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":170,"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":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group8/pull/30"},"issue":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/30"},"comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/pulls/30/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/30/commits"},"statuses":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group8/statuses/69656fb6a725a9169a2836e143d44f22514362a8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ferreron"}}