{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments/41995452","id":41995452,"diff_hunk":"@@ -0,0 +1,101 @@\n+function Bowling() {\n+  this.frameCount = 1;\n+  this.frames = { 1: [0,0],\n+                  2: [0,0],\n+                  3: [0,0],\n+                  4: [0,0],\n+                  5: [0,0],\n+                  6: [0,0],\n+                  7: [0,0],\n+                  8: [0,0],\n+                  9: [0,0],\n+                  10: [0,0,0]\n+                };\n+  this.score = 0;\n+};\n+\n+  Bowling.prototype.updateFrame = function() {\n+    this.frameCount++;\n+  };\n+\n+  Bowling.prototype.bowl = function(val1,val2,val3) {\n+    this.checkScores(val1,val2);\n+    this.frames[this.frameCount][0] = val1;\n+    this.frames[this.frameCount][1] = val2;\n+    if(this.isTenthFrame() == true){\n+      this.tenthFrameBowl(val1,val2,val3)\n+    }\n+    else {\n+      this.updateScore(val1,val2);\n+      this.updateFrame();\n+    };\n+  };\n+\n+  Bowling.prototype.tenthFrameBowl = function(val1,val2,val3) {\n+    this.frames[this.frameCount][0] = val1;\n+    this.frames[this.frameCount][1] = val2;\n+    this.frames[this.frameCount][2] = val3;\n+    this.updateScoreTenth(val1,val2);\n+    if(this.finalRoll()){this.score += val3};\n+    return \"game over\";\n+  };\n+\n+  Bowling.prototype.finalRoll = function() {\n+    if(this.frames[10][0] == 10 || this.frames[10][0] + this.frames[10][1] == 10){","path":"src/Bowling.js","position":44,"original_position":44,"commit_id":"3e87c1d9d268ccfac0e8dbd5e420b9fe80410c40","original_commit_id":"3e87c1d9d268ccfac0e8dbd5e420b9fe80410c40","user":{"login":"sdorunga1","id":950333,"avatar_url":"https://avatars.githubusercontent.com/u/950333?v=3","gravatar_id":"","url":"https://api.github.com/users/sdorunga1","html_url":"https://github.com/sdorunga1","followers_url":"https://api.github.com/users/sdorunga1/followers","following_url":"https://api.github.com/users/sdorunga1/following{/other_user}","gists_url":"https://api.github.com/users/sdorunga1/gists{/gist_id}","starred_url":"https://api.github.com/users/sdorunga1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdorunga1/subscriptions","organizations_url":"https://api.github.com/users/sdorunga1/orgs","repos_url":"https://api.github.com/users/sdorunga1/repos","events_url":"https://api.github.com/users/sdorunga1/events{/privacy}","received_events_url":"https://api.github.com/users/sdorunga1/received_events","type":"User","site_admin":false},"body":"`return (this.frames[10][0] == 10 || this.frames[10][0] + this.frames[10][1] == 10)`","created_at":"2015-10-14T13:54:49Z","updated_at":"2015-10-14T13:54:49Z","html_url":"https://github.com/makersacademy/bowling-challenge/pull/118#discussion_r41995452","pull_request_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments/41995452"},"html":{"href":"https://github.com/makersacademy/bowling-challenge/pull/118#discussion_r41995452"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118","id":47346436,"html_url":"https://github.com/makersacademy/bowling-challenge/pull/118","diff_url":"https://github.com/makersacademy/bowling-challenge/pull/118.diff","patch_url":"https://github.com/makersacademy/bowling-challenge/pull/118.patch","issue_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/118","number":118,"state":"open","locked":false,"title":"Initial submit - refactoring to be done","user":{"login":"aaronkendall","id":12873223,"avatar_url":"https://avatars.githubusercontent.com/u/12873223?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronkendall","html_url":"https://github.com/aaronkendall","followers_url":"https://api.github.com/users/aaronkendall/followers","following_url":"https://api.github.com/users/aaronkendall/following{/other_user}","gists_url":"https://api.github.com/users/aaronkendall/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronkendall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronkendall/subscriptions","organizations_url":"https://api.github.com/users/aaronkendall/orgs","repos_url":"https://api.github.com/users/aaronkendall/repos","events_url":"https://api.github.com/users/aaronkendall/events{/privacy}","received_events_url":"https://api.github.com/users/aaronkendall/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-10T14:20:26Z","updated_at":"2015-10-14T13:54:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee74d13ac44fe66aa2fd3fb396d7cb6f14b551e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118/commits","review_comments_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118/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/118/comments","statuses_url":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/3e87c1d9d268ccfac0e8dbd5e420b9fe80410c40","head":{"label":"aaronkendall:master","ref":"master","sha":"3e87c1d9d268ccfac0e8dbd5e420b9fe80410c40","user":{"login":"aaronkendall","id":12873223,"avatar_url":"https://avatars.githubusercontent.com/u/12873223?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronkendall","html_url":"https://github.com/aaronkendall","followers_url":"https://api.github.com/users/aaronkendall/followers","following_url":"https://api.github.com/users/aaronkendall/following{/other_user}","gists_url":"https://api.github.com/users/aaronkendall/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronkendall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronkendall/subscriptions","organizations_url":"https://api.github.com/users/aaronkendall/orgs","repos_url":"https://api.github.com/users/aaronkendall/repos","events_url":"https://api.github.com/users/aaronkendall/events{/privacy}","received_events_url":"https://api.github.com/users/aaronkendall/received_events","type":"User","site_admin":false},"repo":{"id":43632027,"name":"bowling-challenge","full_name":"aaronkendall/bowling-challenge","owner":{"login":"aaronkendall","id":12873223,"avatar_url":"https://avatars.githubusercontent.com/u/12873223?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronkendall","html_url":"https://github.com/aaronkendall","followers_url":"https://api.github.com/users/aaronkendall/followers","following_url":"https://api.github.com/users/aaronkendall/following{/other_user}","gists_url":"https://api.github.com/users/aaronkendall/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronkendall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronkendall/subscriptions","organizations_url":"https://api.github.com/users/aaronkendall/orgs","repos_url":"https://api.github.com/users/aaronkendall/repos","events_url":"https://api.github.com/users/aaronkendall/events{/privacy}","received_events_url":"https://api.github.com/users/aaronkendall/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronkendall/bowling-challenge","description":"Calculate Scores for Ten Pin Bowling","fork":true,"url":"https://api.github.com/repos/aaronkendall/bowling-challenge","forks_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/forks","keys_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/teams","hooks_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/hooks","issue_events_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/events","assignees_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/tags","blobs_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/languages","stargazers_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/stargazers","contributors_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/contributors","subscribers_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/subscribers","subscription_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/subscription","commits_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/merges","archive_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/downloads","issues_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/labels{/name}","releases_url":"https://api.github.com/repos/aaronkendall/bowling-challenge/releases{/id}","created_at":"2015-10-04T09:59:16Z","updated_at":"2015-10-09T15:19:33Z","pushed_at":"2015-10-10T14:53:04Z","git_url":"git://github.com/aaronkendall/bowling-challenge.git","ssh_url":"git@github.com:aaronkendall/bowling-challenge.git","clone_url":"https://github.com/aaronkendall/bowling-challenge.git","svn_url":"https://github.com/aaronkendall/bowling-challenge","homepage":null,"size":238,"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":"f2286de44637a539a09462d03dba89c469fe40d9","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":"2015-08-31T16:43:50Z","pushed_at":"2015-10-14T10:57:47Z","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":24406,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":151,"mirror_url":null,"open_issues_count":32,"forks":151,"open_issues":32,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118"},"html":{"href":"https://github.com/makersacademy/bowling-challenge/pull/118"},"issue":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/118"},"comments":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/118/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/118/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/3e87c1d9d268ccfac0e8dbd5e420b9fe80410c40"}}}}