{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/high_card/pulls/comments/43588904","id":43588904,"diff_hunk":"@@ -1,5 +1,65 @@\n # Use these two arrays to generate a deck of cards.\n+require \"pry\"\n+\n ranks = [\"A\", 2, 3, 4, 5, 6, 7, 8, 9, 10, \"J\", \"Q\", \"K\" ]\n suits = [ \"hearts\", \"spades\", \"clubs\", \"diamonds\" ]\n-\n players = []\n+deck=[]\n+ranks.each do |rank|\n+  suits.each do |suit|\n+    temp_array=[]\n+    temp_array.push(rank)\n+    temp_array.push(suit)\n+    deck.push(temp_array)\n+  end\n+end\n+\n+\n+def value(card, index)\n+  case card[index][0]\n+  when \"A\"\n+    14\n+  when \"K\"\n+    13\n+  when \"Q\"\n+    12\n+  when \"J\"\n+    11\n+  else\n+    card[index][0]\n+  end\n+end\n+\n+def cards(players,deck)\n+  cards = players.map do |player|\n+    deck.pop\n+  end\n+  cards\n+end\n+\n+def scores(cards)\n+  cards.map do |card|\n+    scores.push(card)\n+  end\n+  scores\n+end\n+\n+def high_card(scores)\n+  high_card=scores.max\n+  return high_card\n+end\n+deck=deck.shuffle\n+\n+puts \"#{players.length} players so far. Enter a player name, or 'play':\"\n+\n+user_input=gets.chomp\n+\n+while user_input != \"play\"","path":"high_card.rb","position":58,"original_position":58,"commit_id":"6054b237408e11da946447a8261c379c0397c653","original_commit_id":"6054b237408e11da946447a8261c379c0397c653","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":"or `until user_input == \"play\"`","created_at":"2015-11-01T22:36:10Z","updated_at":"2015-11-01T22:36:10Z","html_url":"https://github.com/ga-dc/high_card/pull/99#discussion_r43588904","pull_request_url":"https://api.github.com/repos/ga-dc/high_card/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/high_card/pulls/comments/43588904"},"html":{"href":"https://github.com/ga-dc/high_card/pull/99#discussion_r43588904"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/high_card/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/high_card/pulls/99","id":49380805,"html_url":"https://github.com/ga-dc/high_card/pull/99","diff_url":"https://github.com/ga-dc/high_card/pull/99.diff","patch_url":"https://github.com/ga-dc/high_card/pull/99.patch","issue_url":"https://api.github.com/repos/ga-dc/high_card/issues/99","number":99,"state":"open","locked":false,"title":"tim gregg high card hw","user":{"login":"timothytgregg","id":14797542,"avatar_url":"https://avatars.githubusercontent.com/u/14797542?v=3","gravatar_id":"","url":"https://api.github.com/users/timothytgregg","html_url":"https://github.com/timothytgregg","followers_url":"https://api.github.com/users/timothytgregg/followers","following_url":"https://api.github.com/users/timothytgregg/following{/other_user}","gists_url":"https://api.github.com/users/timothytgregg/gists{/gist_id}","starred_url":"https://api.github.com/users/timothytgregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothytgregg/subscriptions","organizations_url":"https://api.github.com/users/timothytgregg/orgs","repos_url":"https://api.github.com/users/timothytgregg/repos","events_url":"https://api.github.com/users/timothytgregg/events{/privacy}","received_events_url":"https://api.github.com/users/timothytgregg/received_events","type":"User","site_admin":false},"body":"Not quite, but almost there. sorry I didn't finish it, but I had to timebox.\r\n\r\n3.5/5s all around.","created_at":"2015-11-01T21:03:20Z","updated_at":"2015-11-01T22:36:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da3199ad38cd1b47da4e693d8917f9c997010b7b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/high_card/pulls/99/commits","review_comments_url":"https://api.github.com/repos/ga-dc/high_card/pulls/99/comments","review_comment_url":"https://api.github.com/repos/ga-dc/high_card/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/high_card/issues/99/comments","statuses_url":"https://api.github.com/repos/ga-dc/high_card/statuses/6054b237408e11da946447a8261c379c0397c653","head":{"label":"timothytgregg:tree","ref":"tree","sha":"6054b237408e11da946447a8261c379c0397c653","user":{"login":"timothytgregg","id":14797542,"avatar_url":"https://avatars.githubusercontent.com/u/14797542?v=3","gravatar_id":"","url":"https://api.github.com/users/timothytgregg","html_url":"https://github.com/timothytgregg","followers_url":"https://api.github.com/users/timothytgregg/followers","following_url":"https://api.github.com/users/timothytgregg/following{/other_user}","gists_url":"https://api.github.com/users/timothytgregg/gists{/gist_id}","starred_url":"https://api.github.com/users/timothytgregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothytgregg/subscriptions","organizations_url":"https://api.github.com/users/timothytgregg/orgs","repos_url":"https://api.github.com/users/timothytgregg/repos","events_url":"https://api.github.com/users/timothytgregg/events{/privacy}","received_events_url":"https://api.github.com/users/timothytgregg/received_events","type":"User","site_admin":false},"repo":{"id":45206001,"name":"high_card","full_name":"timothytgregg/high_card","owner":{"login":"timothytgregg","id":14797542,"avatar_url":"https://avatars.githubusercontent.com/u/14797542?v=3","gravatar_id":"","url":"https://api.github.com/users/timothytgregg","html_url":"https://github.com/timothytgregg","followers_url":"https://api.github.com/users/timothytgregg/followers","following_url":"https://api.github.com/users/timothytgregg/following{/other_user}","gists_url":"https://api.github.com/users/timothytgregg/gists{/gist_id}","starred_url":"https://api.github.com/users/timothytgregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothytgregg/subscriptions","organizations_url":"https://api.github.com/users/timothytgregg/orgs","repos_url":"https://api.github.com/users/timothytgregg/repos","events_url":"https://api.github.com/users/timothytgregg/events{/privacy}","received_events_url":"https://api.github.com/users/timothytgregg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timothytgregg/high_card","description":"[basics, ruby]","fork":true,"url":"https://api.github.com/repos/timothytgregg/high_card","forks_url":"https://api.github.com/repos/timothytgregg/high_card/forks","keys_url":"https://api.github.com/repos/timothytgregg/high_card/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timothytgregg/high_card/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timothytgregg/high_card/teams","hooks_url":"https://api.github.com/repos/timothytgregg/high_card/hooks","issue_events_url":"https://api.github.com/repos/timothytgregg/high_card/issues/events{/number}","events_url":"https://api.github.com/repos/timothytgregg/high_card/events","assignees_url":"https://api.github.com/repos/timothytgregg/high_card/assignees{/user}","branches_url":"https://api.github.com/repos/timothytgregg/high_card/branches{/branch}","tags_url":"https://api.github.com/repos/timothytgregg/high_card/tags","blobs_url":"https://api.github.com/repos/timothytgregg/high_card/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timothytgregg/high_card/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timothytgregg/high_card/git/refs{/sha}","trees_url":"https://api.github.com/repos/timothytgregg/high_card/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timothytgregg/high_card/statuses/{sha}","languages_url":"https://api.github.com/repos/timothytgregg/high_card/languages","stargazers_url":"https://api.github.com/repos/timothytgregg/high_card/stargazers","contributors_url":"https://api.github.com/repos/timothytgregg/high_card/contributors","subscribers_url":"https://api.github.com/repos/timothytgregg/high_card/subscribers","subscription_url":"https://api.github.com/repos/timothytgregg/high_card/subscription","commits_url":"https://api.github.com/repos/timothytgregg/high_card/commits{/sha}","git_commits_url":"https://api.github.com/repos/timothytgregg/high_card/git/commits{/sha}","comments_url":"https://api.github.com/repos/timothytgregg/high_card/comments{/number}","issue_comment_url":"https://api.github.com/repos/timothytgregg/high_card/issues/comments{/number}","contents_url":"https://api.github.com/repos/timothytgregg/high_card/contents/{+path}","compare_url":"https://api.github.com/repos/timothytgregg/high_card/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timothytgregg/high_card/merges","archive_url":"https://api.github.com/repos/timothytgregg/high_card/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timothytgregg/high_card/downloads","issues_url":"https://api.github.com/repos/timothytgregg/high_card/issues{/number}","pulls_url":"https://api.github.com/repos/timothytgregg/high_card/pulls{/number}","milestones_url":"https://api.github.com/repos/timothytgregg/high_card/milestones{/number}","notifications_url":"https://api.github.com/repos/timothytgregg/high_card/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timothytgregg/high_card/labels{/name}","releases_url":"https://api.github.com/repos/timothytgregg/high_card/releases{/id}","created_at":"2015-10-29T19:35:30Z","updated_at":"2015-10-29T19:35:31Z","pushed_at":"2015-11-01T21:02:16Z","git_url":"git://github.com/timothytgregg/high_card.git","ssh_url":"git@github.com:timothytgregg/high_card.git","clone_url":"https://github.com/timothytgregg/high_card.git","svn_url":"https://github.com/timothytgregg/high_card","homepage":"","size":983,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"886c2ce0de7acb4d76c894ff2cd12c001e5b07dc","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":37595801,"name":"high_card","full_name":"ga-dc/high_card","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/high_card","description":"[basics, ruby]","fork":false,"url":"https://api.github.com/repos/ga-dc/high_card","forks_url":"https://api.github.com/repos/ga-dc/high_card/forks","keys_url":"https://api.github.com/repos/ga-dc/high_card/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/high_card/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/high_card/teams","hooks_url":"https://api.github.com/repos/ga-dc/high_card/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/high_card/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/high_card/events","assignees_url":"https://api.github.com/repos/ga-dc/high_card/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/high_card/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/high_card/tags","blobs_url":"https://api.github.com/repos/ga-dc/high_card/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/high_card/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/high_card/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/high_card/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/high_card/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/high_card/languages","stargazers_url":"https://api.github.com/repos/ga-dc/high_card/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/high_card/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/high_card/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/high_card/subscription","commits_url":"https://api.github.com/repos/ga-dc/high_card/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/high_card/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/high_card/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/high_card/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/high_card/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/high_card/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/high_card/merges","archive_url":"https://api.github.com/repos/ga-dc/high_card/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/high_card/downloads","issues_url":"https://api.github.com/repos/ga-dc/high_card/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/high_card/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/high_card/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/high_card/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/high_card/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/high_card/releases{/id}","created_at":"2015-06-17T13:13:34Z","updated_at":"2015-10-29T21:11:13Z","pushed_at":"2015-11-01T21:03:20Z","git_url":"git://github.com/ga-dc/high_card.git","ssh_url":"git@github.com:ga-dc/high_card.git","clone_url":"https://github.com/ga-dc/high_card.git","svn_url":"https://github.com/ga-dc/high_card","homepage":"","size":1026,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":41,"forks":103,"open_issues":41,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/high_card/pulls/99"},"html":{"href":"https://github.com/ga-dc/high_card/pull/99"},"issue":{"href":"https://api.github.com/repos/ga-dc/high_card/issues/99"},"comments":{"href":"https://api.github.com/repos/ga-dc/high_card/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/high_card/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/high_card/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/high_card/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/high_card/statuses/6054b237408e11da946447a8261c379c0397c653"}}}}