{"action":"created","comment":{"url":"https://api.github.com/repos/chandracarney/2048/pulls/comments/25020400","id":25020400,"diff_hunk":"@@ -25,7 +25,20 @@ Board.prototype.pushLeft = function() {\n   this.firstRow = createRow();\n \n   // put temp array elements back into first row\n-  for (var i=0; i < tempArray.length; i++) {\n-    this.firstRow[i] = tempArray[i];\n+  if (tempArray.length > 1) {\n+    this.addNumbersInRow(tempArray);\n+  } else {\n+    this.firstRow[0] = tempArray[0];\n+  };\n+};\n+\n+// while tempArray has elements, add elements into firstRow\n+Board.prototype.addNumbersInRow = function(tempArray) {\n+  for (var i=0; tempArray[0] != null; i++) {\n+    if (tempArray[0] === tempArray[1]) {\n+      this.firstRow[i] = tempArray.shift() + tempArray.shift();\n+    } else {\n+      this.firstRow[i] = tempArray.shift();\n+    };","path":"lib/2048.js","position":45,"original_position":45,"commit_id":"9b0a47fce1c5b50b7d7d37c7ea1d52e5da5683b6","original_commit_id":"9b0a47fce1c5b50b7d7d37c7ea1d52e5da5683b6","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":"Unnecessary semicolon.","created_at":"2015-02-19T20:07:35Z","updated_at":"2015-02-19T20:07:35Z","html_url":"https://github.com/chandracarney/2048/pull/5#discussion_r25020400","pull_request_url":"https://api.github.com/repos/chandracarney/2048/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/chandracarney/2048/pulls/comments/25020400"},"html":{"href":"https://github.com/chandracarney/2048/pull/5#discussion_r25020400"},"pull_request":{"href":"https://api.github.com/repos/chandracarney/2048/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/chandracarney/2048/pulls/5","id":29644221,"html_url":"https://github.com/chandracarney/2048/pull/5","diff_url":"https://github.com/chandracarney/2048/pull/5.diff","patch_url":"https://github.com/chandracarney/2048/pull/5.patch","issue_url":"https://api.github.com/repos/chandracarney/2048/issues/5","number":5,"state":"open","locked":false,"title":"Add pieces","user":{"login":"chandracarney","id":8561841,"avatar_url":"https://avatars.githubusercontent.com/u/8561841?v=3","gravatar_id":"","url":"https://api.github.com/users/chandracarney","html_url":"https://github.com/chandracarney","followers_url":"https://api.github.com/users/chandracarney/followers","following_url":"https://api.github.com/users/chandracarney/following{/other_user}","gists_url":"https://api.github.com/users/chandracarney/gists{/gist_id}","starred_url":"https://api.github.com/users/chandracarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandracarney/subscriptions","organizations_url":"https://api.github.com/users/chandracarney/orgs","repos_url":"https://api.github.com/users/chandracarney/repos","events_url":"https://api.github.com/users/chandracarney/events{/privacy}","received_events_url":"https://api.github.com/users/chandracarney/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-19T20:07:32Z","updated_at":"2015-02-19T20:07:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24e167e927668cdb0d48c37a133f4bc4d9ec7db3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chandracarney/2048/pulls/5/commits","review_comments_url":"https://api.github.com/repos/chandracarney/2048/pulls/5/comments","review_comment_url":"https://api.github.com/repos/chandracarney/2048/pulls/comments/{number}","comments_url":"https://api.github.com/repos/chandracarney/2048/issues/5/comments","statuses_url":"https://api.github.com/repos/chandracarney/2048/statuses/9b0a47fce1c5b50b7d7d37c7ea1d52e5da5683b6","head":{"label":"add_pieces","ref":"add_pieces","sha":"9b0a47fce1c5b50b7d7d37c7ea1d52e5da5683b6","user":{"login":"chandracarney","id":8561841,"avatar_url":"https://avatars.githubusercontent.com/u/8561841?v=3","gravatar_id":"","url":"https://api.github.com/users/chandracarney","html_url":"https://github.com/chandracarney","followers_url":"https://api.github.com/users/chandracarney/followers","following_url":"https://api.github.com/users/chandracarney/following{/other_user}","gists_url":"https://api.github.com/users/chandracarney/gists{/gist_id}","starred_url":"https://api.github.com/users/chandracarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandracarney/subscriptions","organizations_url":"https://api.github.com/users/chandracarney/orgs","repos_url":"https://api.github.com/users/chandracarney/repos","events_url":"https://api.github.com/users/chandracarney/events{/privacy}","received_events_url":"https://api.github.com/users/chandracarney/received_events","type":"User","site_admin":false},"repo":{"id":30614294,"name":"2048","full_name":"chandracarney/2048","owner":{"login":"chandracarney","id":8561841,"avatar_url":"https://avatars.githubusercontent.com/u/8561841?v=3","gravatar_id":"","url":"https://api.github.com/users/chandracarney","html_url":"https://github.com/chandracarney","followers_url":"https://api.github.com/users/chandracarney/followers","following_url":"https://api.github.com/users/chandracarney/following{/other_user}","gists_url":"https://api.github.com/users/chandracarney/gists{/gist_id}","starred_url":"https://api.github.com/users/chandracarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandracarney/subscriptions","organizations_url":"https://api.github.com/users/chandracarney/orgs","repos_url":"https://api.github.com/users/chandracarney/repos","events_url":"https://api.github.com/users/chandracarney/events{/privacy}","received_events_url":"https://api.github.com/users/chandracarney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chandracarney/2048","description":"A JavaScript application to play 2048","fork":false,"url":"https://api.github.com/repos/chandracarney/2048","forks_url":"https://api.github.com/repos/chandracarney/2048/forks","keys_url":"https://api.github.com/repos/chandracarney/2048/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chandracarney/2048/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chandracarney/2048/teams","hooks_url":"https://api.github.com/repos/chandracarney/2048/hooks","issue_events_url":"https://api.github.com/repos/chandracarney/2048/issues/events{/number}","events_url":"https://api.github.com/repos/chandracarney/2048/events","assignees_url":"https://api.github.com/repos/chandracarney/2048/assignees{/user}","branches_url":"https://api.github.com/repos/chandracarney/2048/branches{/branch}","tags_url":"https://api.github.com/repos/chandracarney/2048/tags","blobs_url":"https://api.github.com/repos/chandracarney/2048/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chandracarney/2048/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chandracarney/2048/git/refs{/sha}","trees_url":"https://api.github.com/repos/chandracarney/2048/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chandracarney/2048/statuses/{sha}","languages_url":"https://api.github.com/repos/chandracarney/2048/languages","stargazers_url":"https://api.github.com/repos/chandracarney/2048/stargazers","contributors_url":"https://api.github.com/repos/chandracarney/2048/contributors","subscribers_url":"https://api.github.com/repos/chandracarney/2048/subscribers","subscription_url":"https://api.github.com/repos/chandracarney/2048/subscription","commits_url":"https://api.github.com/repos/chandracarney/2048/commits{/sha}","git_commits_url":"https://api.github.com/repos/chandracarney/2048/git/commits{/sha}","comments_url":"https://api.github.com/repos/chandracarney/2048/comments{/number}","issue_comment_url":"https://api.github.com/repos/chandracarney/2048/issues/comments/{number}","contents_url":"https://api.github.com/repos/chandracarney/2048/contents/{+path}","compare_url":"https://api.github.com/repos/chandracarney/2048/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chandracarney/2048/merges","archive_url":"https://api.github.com/repos/chandracarney/2048/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chandracarney/2048/downloads","issues_url":"https://api.github.com/repos/chandracarney/2048/issues{/number}","pulls_url":"https://api.github.com/repos/chandracarney/2048/pulls{/number}","milestones_url":"https://api.github.com/repos/chandracarney/2048/milestones{/number}","notifications_url":"https://api.github.com/repos/chandracarney/2048/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chandracarney/2048/labels{/name}","releases_url":"https://api.github.com/repos/chandracarney/2048/releases{/id}","created_at":"2015-02-10T21:00:05Z","updated_at":"2015-02-15T01:43:32Z","pushed_at":"2015-02-18T22:33:37Z","git_url":"git://github.com/chandracarney/2048.git","ssh_url":"git@github.com:chandracarney/2048.git","clone_url":"https://github.com/chandracarney/2048.git","svn_url":"https://github.com/chandracarney/2048","homepage":null,"size":536,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"master","ref":"master","sha":"f19e30ec6244966e8e72ee0f3a6b690340334b95","user":{"login":"chandracarney","id":8561841,"avatar_url":"https://avatars.githubusercontent.com/u/8561841?v=3","gravatar_id":"","url":"https://api.github.com/users/chandracarney","html_url":"https://github.com/chandracarney","followers_url":"https://api.github.com/users/chandracarney/followers","following_url":"https://api.github.com/users/chandracarney/following{/other_user}","gists_url":"https://api.github.com/users/chandracarney/gists{/gist_id}","starred_url":"https://api.github.com/users/chandracarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandracarney/subscriptions","organizations_url":"https://api.github.com/users/chandracarney/orgs","repos_url":"https://api.github.com/users/chandracarney/repos","events_url":"https://api.github.com/users/chandracarney/events{/privacy}","received_events_url":"https://api.github.com/users/chandracarney/received_events","type":"User","site_admin":false},"repo":{"id":30614294,"name":"2048","full_name":"chandracarney/2048","owner":{"login":"chandracarney","id":8561841,"avatar_url":"https://avatars.githubusercontent.com/u/8561841?v=3","gravatar_id":"","url":"https://api.github.com/users/chandracarney","html_url":"https://github.com/chandracarney","followers_url":"https://api.github.com/users/chandracarney/followers","following_url":"https://api.github.com/users/chandracarney/following{/other_user}","gists_url":"https://api.github.com/users/chandracarney/gists{/gist_id}","starred_url":"https://api.github.com/users/chandracarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandracarney/subscriptions","organizations_url":"https://api.github.com/users/chandracarney/orgs","repos_url":"https://api.github.com/users/chandracarney/repos","events_url":"https://api.github.com/users/chandracarney/events{/privacy}","received_events_url":"https://api.github.com/users/chandracarney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chandracarney/2048","description":"A JavaScript application to play 2048","fork":false,"url":"https://api.github.com/repos/chandracarney/2048","forks_url":"https://api.github.com/repos/chandracarney/2048/forks","keys_url":"https://api.github.com/repos/chandracarney/2048/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chandracarney/2048/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chandracarney/2048/teams","hooks_url":"https://api.github.com/repos/chandracarney/2048/hooks","issue_events_url":"https://api.github.com/repos/chandracarney/2048/issues/events{/number}","events_url":"https://api.github.com/repos/chandracarney/2048/events","assignees_url":"https://api.github.com/repos/chandracarney/2048/assignees{/user}","branches_url":"https://api.github.com/repos/chandracarney/2048/branches{/branch}","tags_url":"https://api.github.com/repos/chandracarney/2048/tags","blobs_url":"https://api.github.com/repos/chandracarney/2048/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chandracarney/2048/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chandracarney/2048/git/refs{/sha}","trees_url":"https://api.github.com/repos/chandracarney/2048/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chandracarney/2048/statuses/{sha}","languages_url":"https://api.github.com/repos/chandracarney/2048/languages","stargazers_url":"https://api.github.com/repos/chandracarney/2048/stargazers","contributors_url":"https://api.github.com/repos/chandracarney/2048/contributors","subscribers_url":"https://api.github.com/repos/chandracarney/2048/subscribers","subscription_url":"https://api.github.com/repos/chandracarney/2048/subscription","commits_url":"https://api.github.com/repos/chandracarney/2048/commits{/sha}","git_commits_url":"https://api.github.com/repos/chandracarney/2048/git/commits{/sha}","comments_url":"https://api.github.com/repos/chandracarney/2048/comments{/number}","issue_comment_url":"https://api.github.com/repos/chandracarney/2048/issues/comments/{number}","contents_url":"https://api.github.com/repos/chandracarney/2048/contents/{+path}","compare_url":"https://api.github.com/repos/chandracarney/2048/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chandracarney/2048/merges","archive_url":"https://api.github.com/repos/chandracarney/2048/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chandracarney/2048/downloads","issues_url":"https://api.github.com/repos/chandracarney/2048/issues{/number}","pulls_url":"https://api.github.com/repos/chandracarney/2048/pulls{/number}","milestones_url":"https://api.github.com/repos/chandracarney/2048/milestones{/number}","notifications_url":"https://api.github.com/repos/chandracarney/2048/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chandracarney/2048/labels{/name}","releases_url":"https://api.github.com/repos/chandracarney/2048/releases{/id}","created_at":"2015-02-10T21:00:05Z","updated_at":"2015-02-15T01:43:32Z","pushed_at":"2015-02-18T22:33:37Z","git_url":"git://github.com/chandracarney/2048.git","ssh_url":"git@github.com:chandracarney/2048.git","clone_url":"https://github.com/chandracarney/2048.git","svn_url":"https://github.com/chandracarney/2048","homepage":null,"size":536,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chandracarney/2048/pulls/5"},"html":{"href":"https://github.com/chandracarney/2048/pull/5"},"issue":{"href":"https://api.github.com/repos/chandracarney/2048/issues/5"},"comments":{"href":"https://api.github.com/repos/chandracarney/2048/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/chandracarney/2048/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/chandracarney/2048/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/chandracarney/2048/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/chandracarney/2048/statuses/9b0a47fce1c5b50b7d7d37c7ea1d52e5da5683b6"}}}}