{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/game-of-war/pulls/comments/29391341","id":29391341,"diff_hunk":"@@ -17,7 +17,63 @@ function shuffle(array){\n }\n \n function buildDeck(){\n+  var deck=[];\n+  for(var i = 0; i < values.length; i++){\n+    for(var j = 0; j < suits.length; j++){\n+      var temp_hash ={};\n+      temp_hash = {value: values[i], suit: suits[j], score: i+2};\n+      deck.push(temp_hash);\n+    };\n+  };\n \n // Put some code in here!\n+return deck;\n+}\n+\n+var warDeck = buildDeck();\n+var shuffledDeck = shuffle(warDeck);\n+// console.log(warDeck);\n \n+function highCard(deck) {\n+  var playerOne = deck.pop();\n+  var playerTwo = deck.pop();\n+  console.log(playerOne);\n+  console.log(playerTwo);\n+  if(playerOne.score > playerTwo.score){\n+    console.log('player one won!');\n+  } else if (playerOne.score === playerTwo.score) {\n+    console.log(\"Tie\");\n+  } else {\n+    console.log('player two won!');\n+  };\n }\n+\n+// highCard(shuffledDeck);\n+\n+function playWar(deck) {\n+  var playerOneDeck = [];\n+  for(var i = 0; i < 26; i++){\n+    card = deck.pop();\n+    playerOneDeck.push(card);\n+  }\n+  var playerTwoDeck = deck;","path":"cards.js","position":43,"original_position":43,"commit_id":"96fc8c230e8558bd00e6f2740ea15eb575b270df","original_commit_id":"96fc8c230e8558bd00e6f2740ea15eb575b270df","user":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"body":"Can you think of a way to handle an arbitrary (i.e. unknown) amount of players? ","created_at":"2015-04-29T23:19:27Z","updated_at":"2015-04-29T23:19:27Z","html_url":"https://github.com/ga-dc/game-of-war/pull/34#discussion_r29391341","pull_request_url":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/game-of-war/pulls/comments/29391341"},"html":{"href":"https://github.com/ga-dc/game-of-war/pull/34#discussion_r29391341"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34","id":34268350,"html_url":"https://github.com/ga-dc/game-of-war/pull/34","diff_url":"https://github.com/ga-dc/game-of-war/pull/34.diff","patch_url":"https://github.com/ga-dc/game-of-war/pull/34.patch","issue_url":"https://api.github.com/repos/ga-dc/game-of-war/issues/34","number":34,"state":"open","locked":false,"title":"W07D01 Game of War - Damon","user":{"login":"DamonMd","id":11300845,"avatar_url":"https://avatars.githubusercontent.com/u/11300845?v=3","gravatar_id":"","url":"https://api.github.com/users/DamonMd","html_url":"https://github.com/DamonMd","followers_url":"https://api.github.com/users/DamonMd/followers","following_url":"https://api.github.com/users/DamonMd/following{/other_user}","gists_url":"https://api.github.com/users/DamonMd/gists{/gist_id}","starred_url":"https://api.github.com/users/DamonMd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DamonMd/subscriptions","organizations_url":"https://api.github.com/users/DamonMd/orgs","repos_url":"https://api.github.com/users/DamonMd/repos","events_url":"https://api.github.com/users/DamonMd/events{/privacy}","received_events_url":"https://api.github.com/users/DamonMd/received_events","type":"User","site_admin":false},"body":"Completeness: 4\r\nComfort: 4\r\n\r\ndidn't get to finish building out the game of war part, but felt as though I was on a good track. Overall felt comfortable with the assignment. Hopefully I can finish the bonus and refactor the code in the next day.","created_at":"2015-04-28T13:50:15Z","updated_at":"2015-04-29T23:19:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"987fa4b602cb9c2e24740fb3f7cf50d84e3213b6","assignee":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34/commits","review_comments_url":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34/comments","review_comment_url":"https://api.github.com/repos/ga-dc/game-of-war/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/game-of-war/issues/34/comments","statuses_url":"https://api.github.com/repos/ga-dc/game-of-war/statuses/96fc8c230e8558bd00e6f2740ea15eb575b270df","head":{"label":"DamonMd:master","ref":"master","sha":"96fc8c230e8558bd00e6f2740ea15eb575b270df","user":{"login":"DamonMd","id":11300845,"avatar_url":"https://avatars.githubusercontent.com/u/11300845?v=3","gravatar_id":"","url":"https://api.github.com/users/DamonMd","html_url":"https://github.com/DamonMd","followers_url":"https://api.github.com/users/DamonMd/followers","following_url":"https://api.github.com/users/DamonMd/following{/other_user}","gists_url":"https://api.github.com/users/DamonMd/gists{/gist_id}","starred_url":"https://api.github.com/users/DamonMd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DamonMd/subscriptions","organizations_url":"https://api.github.com/users/DamonMd/orgs","repos_url":"https://api.github.com/users/DamonMd/repos","events_url":"https://api.github.com/users/DamonMd/events{/privacy}","received_events_url":"https://api.github.com/users/DamonMd/received_events","type":"User","site_admin":false},"repo":{"id":34689884,"name":"game-of-war","full_name":"DamonMd/game-of-war","owner":{"login":"DamonMd","id":11300845,"avatar_url":"https://avatars.githubusercontent.com/u/11300845?v=3","gravatar_id":"","url":"https://api.github.com/users/DamonMd","html_url":"https://github.com/DamonMd","followers_url":"https://api.github.com/users/DamonMd/followers","following_url":"https://api.github.com/users/DamonMd/following{/other_user}","gists_url":"https://api.github.com/users/DamonMd/gists{/gist_id}","starred_url":"https://api.github.com/users/DamonMd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DamonMd/subscriptions","organizations_url":"https://api.github.com/users/DamonMd/orgs","repos_url":"https://api.github.com/users/DamonMd/repos","events_url":"https://api.github.com/users/DamonMd/events{/privacy}","received_events_url":"https://api.github.com/users/DamonMd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DamonMd/game-of-war","description":"Javascript, basic, card game","fork":true,"url":"https://api.github.com/repos/DamonMd/game-of-war","forks_url":"https://api.github.com/repos/DamonMd/game-of-war/forks","keys_url":"https://api.github.com/repos/DamonMd/game-of-war/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DamonMd/game-of-war/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DamonMd/game-of-war/teams","hooks_url":"https://api.github.com/repos/DamonMd/game-of-war/hooks","issue_events_url":"https://api.github.com/repos/DamonMd/game-of-war/issues/events{/number}","events_url":"https://api.github.com/repos/DamonMd/game-of-war/events","assignees_url":"https://api.github.com/repos/DamonMd/game-of-war/assignees{/user}","branches_url":"https://api.github.com/repos/DamonMd/game-of-war/branches{/branch}","tags_url":"https://api.github.com/repos/DamonMd/game-of-war/tags","blobs_url":"https://api.github.com/repos/DamonMd/game-of-war/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DamonMd/game-of-war/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DamonMd/game-of-war/git/refs{/sha}","trees_url":"https://api.github.com/repos/DamonMd/game-of-war/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DamonMd/game-of-war/statuses/{sha}","languages_url":"https://api.github.com/repos/DamonMd/game-of-war/languages","stargazers_url":"https://api.github.com/repos/DamonMd/game-of-war/stargazers","contributors_url":"https://api.github.com/repos/DamonMd/game-of-war/contributors","subscribers_url":"https://api.github.com/repos/DamonMd/game-of-war/subscribers","subscription_url":"https://api.github.com/repos/DamonMd/game-of-war/subscription","commits_url":"https://api.github.com/repos/DamonMd/game-of-war/commits{/sha}","git_commits_url":"https://api.github.com/repos/DamonMd/game-of-war/git/commits{/sha}","comments_url":"https://api.github.com/repos/DamonMd/game-of-war/comments{/number}","issue_comment_url":"https://api.github.com/repos/DamonMd/game-of-war/issues/comments{/number}","contents_url":"https://api.github.com/repos/DamonMd/game-of-war/contents/{+path}","compare_url":"https://api.github.com/repos/DamonMd/game-of-war/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DamonMd/game-of-war/merges","archive_url":"https://api.github.com/repos/DamonMd/game-of-war/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DamonMd/game-of-war/downloads","issues_url":"https://api.github.com/repos/DamonMd/game-of-war/issues{/number}","pulls_url":"https://api.github.com/repos/DamonMd/game-of-war/pulls{/number}","milestones_url":"https://api.github.com/repos/DamonMd/game-of-war/milestones{/number}","notifications_url":"https://api.github.com/repos/DamonMd/game-of-war/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DamonMd/game-of-war/labels{/name}","releases_url":"https://api.github.com/repos/DamonMd/game-of-war/releases{/id}","created_at":"2015-04-27T20:36:21Z","updated_at":"2015-04-28T13:48:13Z","pushed_at":"2015-04-28T13:48:13Z","git_url":"git://github.com/DamonMd/game-of-war.git","ssh_url":"git@github.com:DamonMd/game-of-war.git","clone_url":"https://github.com/DamonMd/game-of-war.git","svn_url":"https://github.com/DamonMd/game-of-war","homepage":null,"size":59,"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":"ga-dc:master","ref":"master","sha":"8b6e7e31d31cb22089c436e4a9185ba99b0b22d3","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":34663641,"name":"game-of-war","full_name":"ga-dc/game-of-war","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/game-of-war","description":"Javascript, basic, card game","fork":false,"url":"https://api.github.com/repos/ga-dc/game-of-war","forks_url":"https://api.github.com/repos/ga-dc/game-of-war/forks","keys_url":"https://api.github.com/repos/ga-dc/game-of-war/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/game-of-war/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/game-of-war/teams","hooks_url":"https://api.github.com/repos/ga-dc/game-of-war/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/game-of-war/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/game-of-war/events","assignees_url":"https://api.github.com/repos/ga-dc/game-of-war/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/game-of-war/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/game-of-war/tags","blobs_url":"https://api.github.com/repos/ga-dc/game-of-war/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/game-of-war/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/game-of-war/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/game-of-war/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/game-of-war/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/game-of-war/languages","stargazers_url":"https://api.github.com/repos/ga-dc/game-of-war/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/game-of-war/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/game-of-war/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/game-of-war/subscription","commits_url":"https://api.github.com/repos/ga-dc/game-of-war/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/game-of-war/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/game-of-war/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/game-of-war/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/game-of-war/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/game-of-war/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/game-of-war/merges","archive_url":"https://api.github.com/repos/ga-dc/game-of-war/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/game-of-war/downloads","issues_url":"https://api.github.com/repos/ga-dc/game-of-war/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/game-of-war/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/game-of-war/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/game-of-war/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/game-of-war/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/game-of-war/releases{/id}","created_at":"2015-04-27T11:52:02Z","updated_at":"2015-04-27T19:56:48Z","pushed_at":"2015-04-29T05:46:44Z","git_url":"git://github.com/ga-dc/game-of-war.git","ssh_url":"git@github.com:ga-dc/game-of-war.git","clone_url":"https://github.com/ga-dc/game-of-war.git","svn_url":"https://github.com/ga-dc/game-of-war","homepage":null,"size":1664,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":18,"forks":41,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34"},"html":{"href":"https://github.com/ga-dc/game-of-war/pull/34"},"issue":{"href":"https://api.github.com/repos/ga-dc/game-of-war/issues/34"},"comments":{"href":"https://api.github.com/repos/ga-dc/game-of-war/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/game-of-war/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/game-of-war/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/game-of-war/statuses/96fc8c230e8558bd00e6f2740ea15eb575b270df"}}}}