{"action":"created","comment":{"url":"https://api.github.com/repos/benedictbutton/cricket/pulls/comments/221443520","pull_request_review_id":160097316,"id":221443520,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTQ0MzUyMA==","diff_hunk":"@@ -34,44 +37,95 @@ class ScoreContainer extends Component {\n       return playerNames;\n   }\n \n+handlePointDisplay(score) {\n+  let hits = score.hits;\n+  let region = score.region;\n+\n+  let markedHits = (hits) => {\n+    switch(hits) {\n+      case 0: return ' ';\n+      case 1: return '/';\n+      case 2: return 'X';\n+      case 3: return String.fromCharCode(10754);\n+      default: return ' ';\n+    }\n+  };\n+\n+  let pointHits = (hits, region) => {\n+    if(hits<4) {\n+      return markedHits(hits);\n+    }\n+    return (region * hits) - (region*3);\n+  };\n+\n+let result = (score.points) ? pointHits(hits, region) : markedHits(hits);\n+\n+return result;\n+}\n+\n+handlePtsRegion () {\n+  if(this.props.scores.length!==0) {\n+  return this.props.scores[0].points;\n+  }\n+}\n+\n render() {\n-let sortedScores = this.props.scores.sort(this.handleSort);\n+  let pts = this.handlePtsRegion();\n+\n+  let sortedScores = this.props.scores.sort(this.handleSort);\n \n-let players = sortedScores.reduce((this.handleNames), [sortedScores[0]]);\n+  let players = sortedScores.reduce((this.handleNames), [sortedScores[0]]);\n \n-let playerOne = this.props.assignPlayerOne(players);\n+  let playerOne = this.props.assignPlayerOne(players);\n \n-let playerTwo =           this.props.assignPlayerTwo(players);\n+  let playerTwo =           this.props.assignPlayerTwo(players);\n \n   let scoreOne = this.props.scores.slice(0, 7);\n   let scoreTwo = this.props.scores.slice(7,14);\n   let scoreOneIndex = 20;\n   let scoreTwoIndex = 27;\n \n+  let initialValue = 0;","path":"react/src/containers/ScoreContainer.js","position":85,"original_position":85,"commit_id":"96c544ae005460029362c7a57733d3cd17cad7db","original_commit_id":"96c544ae005460029362c7a57733d3cd17cad7db","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","created_at":"2018-09-30T00:42:39Z","updated_at":"2018-09-30T00:42:41Z","html_url":"https://github.com/benedictbutton/cricket/pull/40#discussion_r221443520","pull_request_url":"https://api.github.com/repos/benedictbutton/cricket/pulls/40","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/benedictbutton/cricket/pulls/comments/221443520"},"html":{"href":"https://github.com/benedictbutton/cricket/pull/40#discussion_r221443520"},"pull_request":{"href":"https://api.github.com/repos/benedictbutton/cricket/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/benedictbutton/cricket/pulls/40","id":219176879,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MTc2ODc5","html_url":"https://github.com/benedictbutton/cricket/pull/40","diff_url":"https://github.com/benedictbutton/cricket/pull/40.diff","patch_url":"https://github.com/benedictbutton/cricket/pull/40.patch","issue_url":"https://api.github.com/repos/benedictbutton/cricket/issues/40","number":40,"state":"open","locked":false,"title":"Points/feature","user":{"login":"benedictbutton","id":23641601,"node_id":"MDQ6VXNlcjIzNjQxNjAx","avatar_url":"https://avatars1.githubusercontent.com/u/23641601?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictbutton","html_url":"https://github.com/benedictbutton","followers_url":"https://api.github.com/users/benedictbutton/followers","following_url":"https://api.github.com/users/benedictbutton/following{/other_user}","gists_url":"https://api.github.com/users/benedictbutton/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictbutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictbutton/subscriptions","organizations_url":"https://api.github.com/users/benedictbutton/orgs","repos_url":"https://api.github.com/users/benedictbutton/repos","events_url":"https://api.github.com/users/benedictbutton/events{/privacy}","received_events_url":"https://api.github.com/users/benedictbutton/received_events","type":"User","site_admin":false},"body":"Added the feature to play a match with points. Also fixed where I overlooked mutating state regarding a player's hits. Used the spread operator in combination with Object.assign for the array portion of the score data structure, using it's index as its value property.","created_at":"2018-09-30T00:42:24Z","updated_at":"2018-09-30T00:42:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d78243454de99179ad07e94f27f448a973d38c77","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/benedictbutton/cricket/pulls/40/commits","review_comments_url":"https://api.github.com/repos/benedictbutton/cricket/pulls/40/comments","review_comment_url":"https://api.github.com/repos/benedictbutton/cricket/pulls/comments{/number}","comments_url":"https://api.github.com/repos/benedictbutton/cricket/issues/40/comments","statuses_url":"https://api.github.com/repos/benedictbutton/cricket/statuses/96c544ae005460029362c7a57733d3cd17cad7db","head":{"label":"benedictbutton:Points/Feature","ref":"Points/Feature","sha":"96c544ae005460029362c7a57733d3cd17cad7db","user":{"login":"benedictbutton","id":23641601,"node_id":"MDQ6VXNlcjIzNjQxNjAx","avatar_url":"https://avatars1.githubusercontent.com/u/23641601?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictbutton","html_url":"https://github.com/benedictbutton","followers_url":"https://api.github.com/users/benedictbutton/followers","following_url":"https://api.github.com/users/benedictbutton/following{/other_user}","gists_url":"https://api.github.com/users/benedictbutton/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictbutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictbutton/subscriptions","organizations_url":"https://api.github.com/users/benedictbutton/orgs","repos_url":"https://api.github.com/users/benedictbutton/repos","events_url":"https://api.github.com/users/benedictbutton/events{/privacy}","received_events_url":"https://api.github.com/users/benedictbutton/received_events","type":"User","site_admin":false},"repo":{"id":89809329,"node_id":"MDEwOlJlcG9zaXRvcnk4OTgwOTMyOQ==","name":"cricket","full_name":"benedictbutton/cricket","private":false,"owner":{"login":"benedictbutton","id":23641601,"node_id":"MDQ6VXNlcjIzNjQxNjAx","avatar_url":"https://avatars1.githubusercontent.com/u/23641601?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictbutton","html_url":"https://github.com/benedictbutton","followers_url":"https://api.github.com/users/benedictbutton/followers","following_url":"https://api.github.com/users/benedictbutton/following{/other_user}","gists_url":"https://api.github.com/users/benedictbutton/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictbutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictbutton/subscriptions","organizations_url":"https://api.github.com/users/benedictbutton/orgs","repos_url":"https://api.github.com/users/benedictbutton/repos","events_url":"https://api.github.com/users/benedictbutton/events{/privacy}","received_events_url":"https://api.github.com/users/benedictbutton/received_events","type":"User","site_admin":false},"html_url":"https://github.com/benedictbutton/cricket","description":null,"fork":false,"url":"https://api.github.com/repos/benedictbutton/cricket","forks_url":"https://api.github.com/repos/benedictbutton/cricket/forks","keys_url":"https://api.github.com/repos/benedictbutton/cricket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benedictbutton/cricket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benedictbutton/cricket/teams","hooks_url":"https://api.github.com/repos/benedictbutton/cricket/hooks","issue_events_url":"https://api.github.com/repos/benedictbutton/cricket/issues/events{/number}","events_url":"https://api.github.com/repos/benedictbutton/cricket/events","assignees_url":"https://api.github.com/repos/benedictbutton/cricket/assignees{/user}","branches_url":"https://api.github.com/repos/benedictbutton/cricket/branches{/branch}","tags_url":"https://api.github.com/repos/benedictbutton/cricket/tags","blobs_url":"https://api.github.com/repos/benedictbutton/cricket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benedictbutton/cricket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benedictbutton/cricket/git/refs{/sha}","trees_url":"https://api.github.com/repos/benedictbutton/cricket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benedictbutton/cricket/statuses/{sha}","languages_url":"https://api.github.com/repos/benedictbutton/cricket/languages","stargazers_url":"https://api.github.com/repos/benedictbutton/cricket/stargazers","contributors_url":"https://api.github.com/repos/benedictbutton/cricket/contributors","subscribers_url":"https://api.github.com/repos/benedictbutton/cricket/subscribers","subscription_url":"https://api.github.com/repos/benedictbutton/cricket/subscription","commits_url":"https://api.github.com/repos/benedictbutton/cricket/commits{/sha}","git_commits_url":"https://api.github.com/repos/benedictbutton/cricket/git/commits{/sha}","comments_url":"https://api.github.com/repos/benedictbutton/cricket/comments{/number}","issue_comment_url":"https://api.github.com/repos/benedictbutton/cricket/issues/comments{/number}","contents_url":"https://api.github.com/repos/benedictbutton/cricket/contents/{+path}","compare_url":"https://api.github.com/repos/benedictbutton/cricket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benedictbutton/cricket/merges","archive_url":"https://api.github.com/repos/benedictbutton/cricket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benedictbutton/cricket/downloads","issues_url":"https://api.github.com/repos/benedictbutton/cricket/issues{/number}","pulls_url":"https://api.github.com/repos/benedictbutton/cricket/pulls{/number}","milestones_url":"https://api.github.com/repos/benedictbutton/cricket/milestones{/number}","notifications_url":"https://api.github.com/repos/benedictbutton/cricket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benedictbutton/cricket/labels{/name}","releases_url":"https://api.github.com/repos/benedictbutton/cricket/releases{/id}","deployments_url":"https://api.github.com/repos/benedictbutton/cricket/deployments","created_at":"2017-04-29T19:57:59Z","updated_at":"2018-09-05T01:23:01Z","pushed_at":"2018-09-30T00:42:25Z","git_url":"git://github.com/benedictbutton/cricket.git","ssh_url":"git@github.com:benedictbutton/cricket.git","clone_url":"https://github.com/benedictbutton/cricket.git","svn_url":"https://github.com/benedictbutton/cricket","homepage":null,"size":29495,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"benedictbutton:master","ref":"master","sha":"5ebc9adf57e5294e5fae05c49e8178f70fadbfdb","user":{"login":"benedictbutton","id":23641601,"node_id":"MDQ6VXNlcjIzNjQxNjAx","avatar_url":"https://avatars1.githubusercontent.com/u/23641601?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictbutton","html_url":"https://github.com/benedictbutton","followers_url":"https://api.github.com/users/benedictbutton/followers","following_url":"https://api.github.com/users/benedictbutton/following{/other_user}","gists_url":"https://api.github.com/users/benedictbutton/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictbutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictbutton/subscriptions","organizations_url":"https://api.github.com/users/benedictbutton/orgs","repos_url":"https://api.github.com/users/benedictbutton/repos","events_url":"https://api.github.com/users/benedictbutton/events{/privacy}","received_events_url":"https://api.github.com/users/benedictbutton/received_events","type":"User","site_admin":false},"repo":{"id":89809329,"node_id":"MDEwOlJlcG9zaXRvcnk4OTgwOTMyOQ==","name":"cricket","full_name":"benedictbutton/cricket","private":false,"owner":{"login":"benedictbutton","id":23641601,"node_id":"MDQ6VXNlcjIzNjQxNjAx","avatar_url":"https://avatars1.githubusercontent.com/u/23641601?v=4","gravatar_id":"","url":"https://api.github.com/users/benedictbutton","html_url":"https://github.com/benedictbutton","followers_url":"https://api.github.com/users/benedictbutton/followers","following_url":"https://api.github.com/users/benedictbutton/following{/other_user}","gists_url":"https://api.github.com/users/benedictbutton/gists{/gist_id}","starred_url":"https://api.github.com/users/benedictbutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedictbutton/subscriptions","organizations_url":"https://api.github.com/users/benedictbutton/orgs","repos_url":"https://api.github.com/users/benedictbutton/repos","events_url":"https://api.github.com/users/benedictbutton/events{/privacy}","received_events_url":"https://api.github.com/users/benedictbutton/received_events","type":"User","site_admin":false},"html_url":"https://github.com/benedictbutton/cricket","description":null,"fork":false,"url":"https://api.github.com/repos/benedictbutton/cricket","forks_url":"https://api.github.com/repos/benedictbutton/cricket/forks","keys_url":"https://api.github.com/repos/benedictbutton/cricket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benedictbutton/cricket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benedictbutton/cricket/teams","hooks_url":"https://api.github.com/repos/benedictbutton/cricket/hooks","issue_events_url":"https://api.github.com/repos/benedictbutton/cricket/issues/events{/number}","events_url":"https://api.github.com/repos/benedictbutton/cricket/events","assignees_url":"https://api.github.com/repos/benedictbutton/cricket/assignees{/user}","branches_url":"https://api.github.com/repos/benedictbutton/cricket/branches{/branch}","tags_url":"https://api.github.com/repos/benedictbutton/cricket/tags","blobs_url":"https://api.github.com/repos/benedictbutton/cricket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benedictbutton/cricket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benedictbutton/cricket/git/refs{/sha}","trees_url":"https://api.github.com/repos/benedictbutton/cricket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benedictbutton/cricket/statuses/{sha}","languages_url":"https://api.github.com/repos/benedictbutton/cricket/languages","stargazers_url":"https://api.github.com/repos/benedictbutton/cricket/stargazers","contributors_url":"https://api.github.com/repos/benedictbutton/cricket/contributors","subscribers_url":"https://api.github.com/repos/benedictbutton/cricket/subscribers","subscription_url":"https://api.github.com/repos/benedictbutton/cricket/subscription","commits_url":"https://api.github.com/repos/benedictbutton/cricket/commits{/sha}","git_commits_url":"https://api.github.com/repos/benedictbutton/cricket/git/commits{/sha}","comments_url":"https://api.github.com/repos/benedictbutton/cricket/comments{/number}","issue_comment_url":"https://api.github.com/repos/benedictbutton/cricket/issues/comments{/number}","contents_url":"https://api.github.com/repos/benedictbutton/cricket/contents/{+path}","compare_url":"https://api.github.com/repos/benedictbutton/cricket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benedictbutton/cricket/merges","archive_url":"https://api.github.com/repos/benedictbutton/cricket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benedictbutton/cricket/downloads","issues_url":"https://api.github.com/repos/benedictbutton/cricket/issues{/number}","pulls_url":"https://api.github.com/repos/benedictbutton/cricket/pulls{/number}","milestones_url":"https://api.github.com/repos/benedictbutton/cricket/milestones{/number}","notifications_url":"https://api.github.com/repos/benedictbutton/cricket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benedictbutton/cricket/labels{/name}","releases_url":"https://api.github.com/repos/benedictbutton/cricket/releases{/id}","deployments_url":"https://api.github.com/repos/benedictbutton/cricket/deployments","created_at":"2017-04-29T19:57:59Z","updated_at":"2018-09-05T01:23:01Z","pushed_at":"2018-09-30T00:42:25Z","git_url":"git://github.com/benedictbutton/cricket.git","ssh_url":"git@github.com:benedictbutton/cricket.git","clone_url":"https://github.com/benedictbutton/cricket.git","svn_url":"https://github.com/benedictbutton/cricket","homepage":null,"size":29495,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/benedictbutton/cricket/pulls/40"},"html":{"href":"https://github.com/benedictbutton/cricket/pull/40"},"issue":{"href":"https://api.github.com/repos/benedictbutton/cricket/issues/40"},"comments":{"href":"https://api.github.com/repos/benedictbutton/cricket/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/benedictbutton/cricket/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/benedictbutton/cricket/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/benedictbutton/cricket/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/benedictbutton/cricket/statuses/96c544ae005460029362c7a57733d3cd17cad7db"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}