{"action":"created","comment":{"url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/comments/48476448","id":48476448,"diff_hunk":"@@ -0,0 +1,111 @@\n+#To start the prog type:   main()\n+\n+#Turns the image black and white\n+def blackAndWhite(image):\n+   for pixel in image.getPixels():\n+      red = pixel.getRed()\n+      green = pixel.getGreen()\n+      blue = pixel.getBlue()\n+      average = (red + green + blue) / 3\n+      if average < 128:\n+         red = green = blue = 0\n+      else:\n+         red = green = blue = 255\n+      pixel.setRed(red)\n+      pixel.setGreen(green)\n+      pixel.setBlue(blue)\n+#add a grid to the image\n+def grid(pic):\n+  width = getWidth(pic)\n+  height = getHeight(pic)\n+  size = 10\n+  for x in range(0, width, size):\n+    addLine(pic, x+size, 0, x+size, height)\n+  for y in range(0, height, size):\n+    addLine(pic, 0, y+size, width, y+size)\n+\n+def colorFilter(image, rgbTriple):\n+   def baseValue(value, offset):","path":"TinkeringGraphics","position":28,"original_position":28,"commit_id":"d43ee426ac5661811deb8f2559072fa71d9adc89","original_commit_id":"d43ee426ac5661811deb8f2559072fa71d9adc89","user":{"login":"Adrir","id":2940419,"avatar_url":"https://avatars.githubusercontent.com/u/2940419?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrir","html_url":"https://github.com/Adrir","followers_url":"https://api.github.com/users/Adrir/followers","following_url":"https://api.github.com/users/Adrir/following{/other_user}","gists_url":"https://api.github.com/users/Adrir/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrir/subscriptions","organizations_url":"https://api.github.com/users/Adrir/orgs","repos_url":"https://api.github.com/users/Adrir/repos","events_url":"https://api.github.com/users/Adrir/events{/privacy}","received_events_url":"https://api.github.com/users/Adrir/received_events","type":"User","site_admin":false},"body":"Avoid defining functions inside of other functions, unless there is a compelling reason to restrict access.","created_at":"2015-12-28T12:23:06Z","updated_at":"2015-12-28T12:23:06Z","html_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics/pull/18#discussion_r48476448","pull_request_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/comments/48476448"},"html":{"href":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics/pull/18#discussion_r48476448"},"pull_request":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18","id":54557008,"html_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics/pull/18","diff_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics/pull/18.diff","patch_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics/pull/18.patch","issue_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues/18","number":18,"state":"open","locked":false,"title":"Comp120TinkeringGraphics","user":{"login":"TheHarlander","id":14277388,"avatar_url":"https://avatars.githubusercontent.com/u/14277388?v=3","gravatar_id":"","url":"https://api.github.com/users/TheHarlander","html_url":"https://github.com/TheHarlander","followers_url":"https://api.github.com/users/TheHarlander/followers","following_url":"https://api.github.com/users/TheHarlander/following{/other_user}","gists_url":"https://api.github.com/users/TheHarlander/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHarlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHarlander/subscriptions","organizations_url":"https://api.github.com/users/TheHarlander/orgs","repos_url":"https://api.github.com/users/TheHarlander/repos","events_url":"https://api.github.com/users/TheHarlander/events{/privacy}","received_events_url":"https://api.github.com/users/TheHarlander/received_events","type":"User","site_admin":false},"body":"3rd Attempt at tinkering graphics.","created_at":"2015-12-24T15:40:41Z","updated_at":"2015-12-28T12:23:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"982a01ea4b528e1fbbc8637ffdc7d377d9e4d52a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18/commits","review_comments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18/comments","review_comment_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues/18/comments","statuses_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/statuses/d43ee426ac5661811deb8f2559072fa71d9adc89","head":{"label":"TheHarlander:master","ref":"master","sha":"d43ee426ac5661811deb8f2559072fa71d9adc89","user":{"login":"TheHarlander","id":14277388,"avatar_url":"https://avatars.githubusercontent.com/u/14277388?v=3","gravatar_id":"","url":"https://api.github.com/users/TheHarlander","html_url":"https://github.com/TheHarlander","followers_url":"https://api.github.com/users/TheHarlander/followers","following_url":"https://api.github.com/users/TheHarlander/following{/other_user}","gists_url":"https://api.github.com/users/TheHarlander/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHarlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHarlander/subscriptions","organizations_url":"https://api.github.com/users/TheHarlander/orgs","repos_url":"https://api.github.com/users/TheHarlander/repos","events_url":"https://api.github.com/users/TheHarlander/events{/privacy}","received_events_url":"https://api.github.com/users/TheHarlander/received_events","type":"User","site_admin":false},"repo":{"id":45973350,"name":"comp120-tinkering-graphics","full_name":"TheHarlander/comp120-tinkering-graphics","owner":{"login":"TheHarlander","id":14277388,"avatar_url":"https://avatars.githubusercontent.com/u/14277388?v=3","gravatar_id":"","url":"https://api.github.com/users/TheHarlander","html_url":"https://github.com/TheHarlander","followers_url":"https://api.github.com/users/TheHarlander/followers","following_url":"https://api.github.com/users/TheHarlander/following{/other_user}","gists_url":"https://api.github.com/users/TheHarlander/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHarlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHarlander/subscriptions","organizations_url":"https://api.github.com/users/TheHarlander/orgs","repos_url":"https://api.github.com/users/TheHarlander/repos","events_url":"https://api.github.com/users/TheHarlander/events{/privacy}","received_events_url":"https://api.github.com/users/TheHarlander/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TheHarlander/comp120-tinkering-graphics","description":"Re-purposing graphic manipulation algorithms in Python.","fork":true,"url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics","forks_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/forks","keys_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/teams","hooks_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/hooks","issue_events_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/issues/events{/number}","events_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/events","assignees_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/assignees{/user}","branches_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/branches{/branch}","tags_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/tags","blobs_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/statuses/{sha}","languages_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/languages","stargazers_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/stargazers","contributors_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/contributors","subscribers_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/subscribers","subscription_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/subscription","commits_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/contents/{+path}","compare_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/merges","archive_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/downloads","issues_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/issues{/number}","pulls_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/pulls{/number}","milestones_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/milestones{/number}","notifications_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/labels{/name}","releases_url":"https://api.github.com/repos/TheHarlander/comp120-tinkering-graphics/releases{/id}","created_at":"2015-11-11T09:51:44Z","updated_at":"2015-11-11T09:51:45Z","pushed_at":"2015-12-24T15:39:35Z","git_url":"git://github.com/TheHarlander/comp120-tinkering-graphics.git","ssh_url":"git@github.com:TheHarlander/comp120-tinkering-graphics.git","clone_url":"https://github.com/TheHarlander/comp120-tinkering-graphics.git","svn_url":"https://github.com/TheHarlander/comp120-tinkering-graphics","homepage":"","size":219,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Falmouth-Games-Academy:master","ref":"master","sha":"0caad37033fd977fcf177e7b58a8f4353cfc28bc","user":{"login":"Falmouth-Games-Academy","id":13518108,"avatar_url":"https://avatars.githubusercontent.com/u/13518108?v=3","gravatar_id":"","url":"https://api.github.com/users/Falmouth-Games-Academy","html_url":"https://github.com/Falmouth-Games-Academy","followers_url":"https://api.github.com/users/Falmouth-Games-Academy/followers","following_url":"https://api.github.com/users/Falmouth-Games-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Falmouth-Games-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Falmouth-Games-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falmouth-Games-Academy/subscriptions","organizations_url":"https://api.github.com/users/Falmouth-Games-Academy/orgs","repos_url":"https://api.github.com/users/Falmouth-Games-Academy/repos","events_url":"https://api.github.com/users/Falmouth-Games-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Falmouth-Games-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":45873447,"name":"comp120-tinkering-graphics","full_name":"Falmouth-Games-Academy/comp120-tinkering-graphics","owner":{"login":"Falmouth-Games-Academy","id":13518108,"avatar_url":"https://avatars.githubusercontent.com/u/13518108?v=3","gravatar_id":"","url":"https://api.github.com/users/Falmouth-Games-Academy","html_url":"https://github.com/Falmouth-Games-Academy","followers_url":"https://api.github.com/users/Falmouth-Games-Academy/followers","following_url":"https://api.github.com/users/Falmouth-Games-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Falmouth-Games-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Falmouth-Games-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falmouth-Games-Academy/subscriptions","organizations_url":"https://api.github.com/users/Falmouth-Games-Academy/orgs","repos_url":"https://api.github.com/users/Falmouth-Games-Academy/repos","events_url":"https://api.github.com/users/Falmouth-Games-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Falmouth-Games-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics","description":"Re-purposing graphic manipulation algorithms in Python.","fork":false,"url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics","forks_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/forks","keys_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/teams","hooks_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/hooks","issue_events_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues/events{/number}","events_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/events","assignees_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/assignees{/user}","branches_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/branches{/branch}","tags_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/tags","blobs_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/git/refs{/sha}","trees_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/statuses/{sha}","languages_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/languages","stargazers_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/stargazers","contributors_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/contributors","subscribers_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/subscribers","subscription_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/subscription","commits_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/commits{/sha}","git_commits_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/git/commits{/sha}","comments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/comments{/number}","issue_comment_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues/comments{/number}","contents_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/contents/{+path}","compare_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/merges","archive_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/downloads","issues_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues{/number}","pulls_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls{/number}","milestones_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/milestones{/number}","notifications_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/labels{/name}","releases_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/releases{/id}","created_at":"2015-11-09T23:18:44Z","updated_at":"2015-11-11T07:45:39Z","pushed_at":"2015-12-24T15:40:42Z","git_url":"git://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics.git","ssh_url":"git@github.com:Falmouth-Games-Academy/comp120-tinkering-graphics.git","clone_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics.git","svn_url":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":1,"forks":11,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18"},"html":{"href":"https://github.com/Falmouth-Games-Academy/comp120-tinkering-graphics/pull/18"},"issue":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues/18"},"comments":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp120-tinkering-graphics/statuses/d43ee426ac5661811deb8f2559072fa71d9adc89"}}}}