{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments/86775811","pull_request_review_id":7414031,"id":86775811,"diff_hunk":"@@ -0,0 +1,116 @@\n+'use strict';\n+\n+var BowlingGame = function () {\n+  this.LOWESTSCORE = 0;\n+  this.HIGHESTSCORE = 270;\n+  this.MAXFRAMES = 10;\n+  this.score = 0;\n+  this.noOfFrames = [];\n+}\n+\n+BowlingGame.prototype.addFrame = function (frame) {\n+  if (this._addFrameLimit() === true) {\n+    return 'Game is over';\n+  } else if (this._framesLengthIs9() === true) {\n+    this._isFinalFrame(frame);\n+  }  else {\n+    this._incrementNoOfFrames(frame);\n+    this._incrementScore();\n+  }\n+}\n+\n+BowlingGame.prototype.giveOutcome = function () {\n+  if (this._isLowest() === true) {\n+    return 'Gutter game! Too bad, try again next time!';\n+  } else if (this._isHighest() === true) {\n+    return 'Perfect game!';\n+  } else {\n+    return 'Your score is ' + this.score;\n+  }\n+}\n+\n+BowlingGame.prototype._addFrameLimit = function () {\n+  return this.noOfFrames.length === this.MAXFRAMES;\n+}\n+\n+BowlingGame.prototype._incrementNoOfFrames  = function (frame) {\n+  this.noOfFrames.push(frame);\n+}\n+\n+BowlingGame.prototype._incrementScore = function () {\n+  if (this._lastTwoFramesWereStrikes() === true) {\n+    this.score += ((this._currentFrame().rollsTotal) * 2) + (this._currentFrame().roll1);\n+  } else if (this._lastFrameWasStrike() === true) {\n+    this.score += ((this._currentFrame().rollsTotal) * 2)\n+  } else if (this._lastFrameWasSpare() === true) {\n+    this.score += ((this._currentFrame().rollsTotal) + (this._currentFrame().roll1));\n+  } else {\n+    this.score += this._currentFrame().rollsTotal;\n+  }\n+}\n+\n+BowlingGame.prototype._lastTwoFramesWereStrikes = function () {\n+  if (this._isFirstOrSecondFrame()) {\n+    return false;\n+  } else {\n+    return ((this._isLastFrame().roll1 === 10) && (this._isLastFrame().roll1 === 10));\n+  }\n+}\n+\n+BowlingGame.prototype._lastFrameWasStrike = function () {\n+  if (this._isFirstFrame()){\n+    return false;\n+  } else {\n+    return (this._isLastFrame().roll1 === 10);\n+  }\n+}\n+\n+BowlingGame.prototype._lastFrameWasSpare = function () {\n+  if (this._isFirstFrame()){\n+    return false;\n+  } else {\n+    return (this._isLastFrame().rollsTotal === 10 && this._isLastFrame().roll1 !== 10);\n+  }\n+}\n+\n+BowlingGame.prototype._isLowest = function () {\n+  return this.score === this.LOWESTSCORE;\n+}\n+\n+BowlingGame.prototype._isHighest = function () {\n+  return this.score === this.HIGHESTSCORE;\n+}\n+\n+BowlingGame.prototype._currentFrame =  function () {\n+  return this.noOfFrames[this.noOfFrames.length-1];\n+}\n+\n+BowlingGame.prototype._isLastFrame =  function () {\n+  return this.noOfFrames[this.noOfFrames.length-2];\n+}\n+\n+BowlingGame.prototype._isFrameBefore =  function () {\n+  return this.noOfFrames[this.noOfFrames.length-3];\n+}\n+\n+BowlingGame.prototype._isFirstFrame = function () {\n+  return this.noOfFrames.length <= 1;\n+}\n+\n+BowlingGame.prototype._isFirstOrSecondFrame = function () {\n+  return this.noOfFrames.length <= 2;\n+}\n+\n+BowlingGame.prototype._framesLengthIs9 = function () {\n+  return this.noOfFrames.length === 9;\n+}\n+\n+BowlingGame.prototype._isFinalFrame = function (frame) {","path":"src/BowlingGame.js","position":108,"original_position":108,"commit_id":"5541d06d9a2a98cdee0d42aece5a050f94bb0eb7","original_commit_id":"5541d06d9a2a98cdee0d42aece5a050f94bb0eb7","user":{"login":"maryrosecook","id":2716,"avatar_url":"https://avatars.githubusercontent.com/u/2716?v=3","gravatar_id":"","url":"https://api.github.com/users/maryrosecook","html_url":"https://github.com/maryrosecook","followers_url":"https://api.github.com/users/maryrosecook/followers","following_url":"https://api.github.com/users/maryrosecook/following{/other_user}","gists_url":"https://api.github.com/users/maryrosecook/gists{/gist_id}","starred_url":"https://api.github.com/users/maryrosecook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maryrosecook/subscriptions","organizations_url":"https://api.github.com/users/maryrosecook/orgs","repos_url":"https://api.github.com/users/maryrosecook/repos","events_url":"https://api.github.com/users/maryrosecook/events{/privacy}","received_events_url":"https://api.github.com/users/maryrosecook/received_events","type":"User","site_admin":false},"body":"This method name is a bit confusing.  The `is` makes it sound like it's going to return a boolean and not change any state.  But it changes state and doesn't return anything...","created_at":"2016-11-07T13:37:41Z","updated_at":"2016-11-07T13:41:09Z","html_url":"https://github.com/makersacademy/bowling-challenge/pull/400#discussion_r86775811","pull_request_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/comments/86775811"},"html":{"href":"https://github.com/makersacademy/bowling-challenge/pull/400#discussion_r86775811"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400","id":92538640,"html_url":"https://github.com/makersacademy/bowling-challenge/pull/400","diff_url":"https://github.com/makersacademy/bowling-challenge/pull/400.diff","patch_url":"https://github.com/makersacademy/bowling-challenge/pull/400.patch","issue_url":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/400","number":400,"state":"open","locked":false,"title":"Elizabeth Venner bowling challenge","user":{"login":"elizabethvenner","id":19158104,"avatar_url":"https://avatars.githubusercontent.com/u/19158104?v=3","gravatar_id":"","url":"https://api.github.com/users/elizabethvenner","html_url":"https://github.com/elizabethvenner","followers_url":"https://api.github.com/users/elizabethvenner/followers","following_url":"https://api.github.com/users/elizabethvenner/following{/other_user}","gists_url":"https://api.github.com/users/elizabethvenner/gists{/gist_id}","starred_url":"https://api.github.com/users/elizabethvenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elizabethvenner/subscriptions","organizations_url":"https://api.github.com/users/elizabethvenner/orgs","repos_url":"https://api.github.com/users/elizabethvenner/repos","events_url":"https://api.github.com/users/elizabethvenner/events{/privacy}","received_events_url":"https://api.github.com/users/elizabethvenner/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-07T08:04:45Z","updated_at":"2016-11-07T13:41:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7debd527bdcd52ddb76f327116c57e4105c767fa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400/commits","review_comments_url":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400/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/400/comments","statuses_url":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/5541d06d9a2a98cdee0d42aece5a050f94bb0eb7","head":{"label":"elizabethvenner:master","ref":"master","sha":"5541d06d9a2a98cdee0d42aece5a050f94bb0eb7","user":{"login":"elizabethvenner","id":19158104,"avatar_url":"https://avatars.githubusercontent.com/u/19158104?v=3","gravatar_id":"","url":"https://api.github.com/users/elizabethvenner","html_url":"https://github.com/elizabethvenner","followers_url":"https://api.github.com/users/elizabethvenner/followers","following_url":"https://api.github.com/users/elizabethvenner/following{/other_user}","gists_url":"https://api.github.com/users/elizabethvenner/gists{/gist_id}","starred_url":"https://api.github.com/users/elizabethvenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elizabethvenner/subscriptions","organizations_url":"https://api.github.com/users/elizabethvenner/orgs","repos_url":"https://api.github.com/users/elizabethvenner/repos","events_url":"https://api.github.com/users/elizabethvenner/events{/privacy}","received_events_url":"https://api.github.com/users/elizabethvenner/received_events","type":"User","site_admin":false},"repo":{"id":72280912,"name":"bowling-challenge","full_name":"elizabethvenner/bowling-challenge","owner":{"login":"elizabethvenner","id":19158104,"avatar_url":"https://avatars.githubusercontent.com/u/19158104?v=3","gravatar_id":"","url":"https://api.github.com/users/elizabethvenner","html_url":"https://github.com/elizabethvenner","followers_url":"https://api.github.com/users/elizabethvenner/followers","following_url":"https://api.github.com/users/elizabethvenner/following{/other_user}","gists_url":"https://api.github.com/users/elizabethvenner/gists{/gist_id}","starred_url":"https://api.github.com/users/elizabethvenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elizabethvenner/subscriptions","organizations_url":"https://api.github.com/users/elizabethvenner/orgs","repos_url":"https://api.github.com/users/elizabethvenner/repos","events_url":"https://api.github.com/users/elizabethvenner/events{/privacy}","received_events_url":"https://api.github.com/users/elizabethvenner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elizabethvenner/bowling-challenge","description":"Calculate Scores for Ten Pin Bowling","fork":true,"url":"https://api.github.com/repos/elizabethvenner/bowling-challenge","forks_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/forks","keys_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/teams","hooks_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/hooks","issue_events_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/events","assignees_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/tags","blobs_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/languages","stargazers_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/stargazers","contributors_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/contributors","subscribers_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/subscribers","subscription_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/subscription","commits_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/merges","archive_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/downloads","issues_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/labels{/name}","releases_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/releases{/id}","deployments_url":"https://api.github.com/repos/elizabethvenner/bowling-challenge/deployments","created_at":"2016-10-29T11:31:05Z","updated_at":"2016-10-29T16:01:53Z","pushed_at":"2016-11-07T08:31:59Z","git_url":"git://github.com/elizabethvenner/bowling-challenge.git","ssh_url":"git@github.com:elizabethvenner/bowling-challenge.git","clone_url":"https://github.com/elizabethvenner/bowling-challenge.git","svn_url":"https://github.com/elizabethvenner/bowling-challenge","homepage":null,"size":251,"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":"09cbc5357b36707cca04ea6150124aa87cfb094c","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}","deployments_url":"https://api.github.com/repos/makersacademy/bowling-challenge/deployments","created_at":"2014-11-22T17:07:53Z","updated_at":"2016-10-28T17:16:11Z","pushed_at":"2016-11-07T12:11:57Z","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":89156,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":487,"mirror_url":null,"open_issues_count":163,"forks":487,"open_issues":163,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400"},"html":{"href":"https://github.com/makersacademy/bowling-challenge/pull/400"},"issue":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/400"},"comments":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/pulls/400/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/400/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/bowling-challenge/statuses/5541d06d9a2a98cdee0d42aece5a050f94bb0eb7"}}}}
{"actor":{"display_login":"maryrosecook"}}