{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments/49952614","id":49952614,"diff_hunk":"@@ -0,0 +1,42 @@\n+function Score() {\n+}\n+\n+Score.prototype.giveScore = function(pins) {\n+  this.scores = [];\n+  var total = 0;\n+  var currentScore;\n+\n+  for(var i = 0; i < (pins.length-1); i++) {\n+    if(pins[i][0] === 10) {\n+      currentScore = this._calculateStrikeScore(pins, i);\n+      total += currentScore;\n+    } else if(pins[i][0] + pins[i][1] === 10) {\n+      currentScore = this._calculateSpareScore(pins, i);\n+      total += currentScore;\n+    } else {\n+      total += (pins[i][0] + pins[i][1])\n+    }\n+    this.scores.push(total);\n+  }\n+\n+  var sum = (pins[pins.length-1]).reduce(add, 0);\n+  this.scores.push(total + sum);\n+  return this.scores;\n+};\n+\n+Score.prototype._calculateStrikeScore = function(pins, i) {\n+  var strikeScore = 0;\n+  var flattenedPins = flattenArraySection(pins, i);","path":"src/score.js","position":29,"original_position":29,"commit_id":"fee085a9e2eafee17616ea76cbf704ade61a840e","original_commit_id":"fee085a9e2eafee17616ea76cbf704ade61a840e","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'flattenArraySection' is not defined.","created_at":"2016-01-17T21:16:31Z","updated_at":"2016-01-17T21:16:31Z","html_url":"https://github.com/makersacademy/bowling-challenge/pull/190#discussion_r49952614","pull_request_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments/49952614"},"html":{"href":"https://github.com/makersacademy/bowling-challenge/pull/190#discussion_r49952614"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190","id":56287643,"html_url":"https://github.com/makersacademy/bowling-challenge/pull/190","diff_url":"https://github.com/makersacademy/bowling-challenge/pull/190.diff","patch_url":"https://github.com/makersacademy/bowling-challenge/pull/190.patch","issue_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/190","number":190,"state":"open","locked":false,"title":"Bowling-challenge","user":{"login":"klssmith","id":12881990,"avatar_url":"https://avatars.githubusercontent.com/u/12881990?v=3","gravatar_id":"","url":"https://api.github.com/users/klssmith","html_url":"https://github.com/klssmith","followers_url":"https://api.github.com/users/klssmith/followers","following_url":"https://api.github.com/users/klssmith/following{/other_user}","gists_url":"https://api.github.com/users/klssmith/gists{/gist_id}","starred_url":"https://api.github.com/users/klssmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klssmith/subscriptions","organizations_url":"https://api.github.com/users/klssmith/orgs","repos_url":"https://api.github.com/users/klssmith/repos","events_url":"https://api.github.com/users/klssmith/events{/privacy}","received_events_url":"https://api.github.com/users/klssmith/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-17T21:16:27Z","updated_at":"2016-01-17T21:16:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b19c04a35902f790711ef2b7bda55ce7d65893f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190/commits","review_comments_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190/comments","review_comment_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/190/comments","statuses_url":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/fee085a9e2eafee17616ea76cbf704ade61a840e","head":{"label":"klssmith:master","ref":"master","sha":"fee085a9e2eafee17616ea76cbf704ade61a840e","user":{"login":"klssmith","id":12881990,"avatar_url":"https://avatars.githubusercontent.com/u/12881990?v=3","gravatar_id":"","url":"https://api.github.com/users/klssmith","html_url":"https://github.com/klssmith","followers_url":"https://api.github.com/users/klssmith/followers","following_url":"https://api.github.com/users/klssmith/following{/other_user}","gists_url":"https://api.github.com/users/klssmith/gists{/gist_id}","starred_url":"https://api.github.com/users/klssmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klssmith/subscriptions","organizations_url":"https://api.github.com/users/klssmith/orgs","repos_url":"https://api.github.com/users/klssmith/repos","events_url":"https://api.github.com/users/klssmith/events{/privacy}","received_events_url":"https://api.github.com/users/klssmith/received_events","type":"User","site_admin":false},"repo":{"id":49333451,"name":"bowling-challenge","full_name":"klssmith/bowling-challenge","owner":{"login":"klssmith","id":12881990,"avatar_url":"https://avatars.githubusercontent.com/u/12881990?v=3","gravatar_id":"","url":"https://api.github.com/users/klssmith","html_url":"https://github.com/klssmith","followers_url":"https://api.github.com/users/klssmith/followers","following_url":"https://api.github.com/users/klssmith/following{/other_user}","gists_url":"https://api.github.com/users/klssmith/gists{/gist_id}","starred_url":"https://api.github.com/users/klssmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klssmith/subscriptions","organizations_url":"https://api.github.com/users/klssmith/orgs","repos_url":"https://api.github.com/users/klssmith/repos","events_url":"https://api.github.com/users/klssmith/events{/privacy}","received_events_url":"https://api.github.com/users/klssmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/klssmith/bowling-challenge","description":"Calculate Scores for Ten Pin Bowling","fork":true,"url":"https://api.github.com/repos/klssmith/bowling-challenge","forks_url":"https://api.github.com/repos/klssmith/bowling-challenge/forks","keys_url":"https://api.github.com/repos/klssmith/bowling-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klssmith/bowling-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klssmith/bowling-challenge/teams","hooks_url":"https://api.github.com/repos/klssmith/bowling-challenge/hooks","issue_events_url":"https://api.github.com/repos/klssmith/bowling-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/klssmith/bowling-challenge/events","assignees_url":"https://api.github.com/repos/klssmith/bowling-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/klssmith/bowling-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/klssmith/bowling-challenge/tags","blobs_url":"https://api.github.com/repos/klssmith/bowling-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klssmith/bowling-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klssmith/bowling-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/klssmith/bowling-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klssmith/bowling-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/klssmith/bowling-challenge/languages","stargazers_url":"https://api.github.com/repos/klssmith/bowling-challenge/stargazers","contributors_url":"https://api.github.com/repos/klssmith/bowling-challenge/contributors","subscribers_url":"https://api.github.com/repos/klssmith/bowling-challenge/subscribers","subscription_url":"https://api.github.com/repos/klssmith/bowling-challenge/subscription","commits_url":"https://api.github.com/repos/klssmith/bowling-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/klssmith/bowling-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/klssmith/bowling-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/klssmith/bowling-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/klssmith/bowling-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/klssmith/bowling-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klssmith/bowling-challenge/merges","archive_url":"https://api.github.com/repos/klssmith/bowling-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klssmith/bowling-challenge/downloads","issues_url":"https://api.github.com/repos/klssmith/bowling-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/klssmith/bowling-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/klssmith/bowling-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/klssmith/bowling-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klssmith/bowling-challenge/labels{/name}","releases_url":"https://api.github.com/repos/klssmith/bowling-challenge/releases{/id}","created_at":"2016-01-09T17:14:03Z","updated_at":"2016-01-11T08:39:25Z","pushed_at":"2016-01-17T21:14:07Z","git_url":"git://github.com/klssmith/bowling-challenge.git","ssh_url":"git@github.com:klssmith/bowling-challenge.git","clone_url":"https://github.com/klssmith/bowling-challenge.git","svn_url":"https://github.com/klssmith/bowling-challenge","homepage":null,"size":191,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"makersacademy:master","ref":"master","sha":"3fe76ca2790d5b1b207b9cc77b4f41e8bcbd7340","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":27005859,"name":"bowling-challenge","full_name":"makersacademy/bowling-challenge","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/bowling-challenge","description":"Calculate Scores for Ten Pin Bowling","fork":false,"url":"https://api.github.com/repos/makersacademy/bowling-challenge","forks_url":"https://api.github.com/repos/makersacademy/bowling-challenge/forks","keys_url":"https://api.github.com/repos/makersacademy/bowling-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/bowling-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/bowling-challenge/teams","hooks_url":"https://api.github.com/repos/makersacademy/bowling-challenge/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/bowling-challenge/events","assignees_url":"https://api.github.com/repos/makersacademy/bowling-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/bowling-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/bowling-challenge/tags","blobs_url":"https://api.github.com/repos/makersacademy/bowling-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/bowling-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/bowling-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/bowling-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/bowling-challenge/languages","stargazers_url":"https://api.github.com/repos/makersacademy/bowling-challenge/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/bowling-challenge/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/bowling-challenge/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/bowling-challenge/subscription","commits_url":"https://api.github.com/repos/makersacademy/bowling-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/bowling-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/bowling-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/bowling-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/bowling-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/bowling-challenge/merges","archive_url":"https://api.github.com/repos/makersacademy/bowling-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/bowling-challenge/downloads","issues_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/bowling-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/bowling-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/bowling-challenge/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/bowling-challenge/releases{/id}","created_at":"2014-11-22T17:07:53Z","updated_at":"2016-01-09T22:02:31Z","pushed_at":"2016-01-17T21:16:27Z","git_url":"git://github.com/makersacademy/bowling-challenge.git","ssh_url":"git@github.com:makersacademy/bowling-challenge.git","clone_url":"https://github.com/makersacademy/bowling-challenge.git","svn_url":"https://github.com/makersacademy/bowling-challenge","homepage":null,"size":61589,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":15,"forks":209,"open_issues":15,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190"},"html":{"href":"https://github.com/makersacademy/bowling-challenge/pull/190"},"issue":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/190"},"comments":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/fee085a9e2eafee17616ea76cbf704ade61a840e"}}}}