{"action":"created","comment":{"url":"https://api.github.com/repos/echase6/network_poker/pulls/comments/72890686","id":72890686,"diff_hunk":"@@ -0,0 +1,60 @@\n+\"\"\"\"Sets up the Deck class for a network Poker game\"\"\"\n+\n+\n+from card import Card\n+from random import shuffle\n+\n+\n+class Deck:\n+    def __init__(self, cards):\n+        self.cards = cards\n+\n+\n+    def __eq__(self, other):\n+        \"\"\"Return eq\n+        >>> (\n+        ... Deck() ==\n+        ... Deck()\n+        ... )\n+        True\n+        >>> (\n+        ... Deck() ==\n+        ... Deck(1)\n+        ... )\n+        False\n+        \"\"\"\n+        return(\n+            self.cards == other.cards\n+        )\n+\n+\n+    def __repr__(self):\n+        \"\"\"Return repr.\n+        >>> repr(Deck([Card('H', '5'), Card('C', '2')]))\n+        \"Deck([Card('H', '5'), Card('C', '2')])\"\n+        \"\"\"\n+        return 'Deck({!r})'.format(\n+            self.cards\n+        )\n+\n+\n+def generate_deck(suits, ranks):\n+    \"\"\"create a list of Cards and save them to a Deck\n+    >>> generate_deck(['H', 'D'], ['1', '2', '3'])\n+    Deck([Card('H', '1'), Card('H', '2'), Card('H', '3'), Card('D', '1'), Card('D', '2'), Card('D', '3')])\n+    \"\"\"\n+    new_list = []\n+    for suit in suits:\n+        for rank in ranks:\n+            new_list += [Card(suit, rank)]\n+    return Deck(new_list)\n+\n+\n+def shuffle_the_deck(deck):\n+    \"\"\"relies on the random library shuffle function to reliably randomize the order of cards\"\"\"\n+    shuffle(deck.cards)\n+\n+\n+def draw_card_from_deck(deck):\n+    \"\"\"draws a card from the deck\"\"\"","path":"deck.py","position":59,"original_position":59,"commit_id":"96c5774ea624ec6815466eac19443e9f347a940a","original_commit_id":"96c5774ea624ec6815466eac19443e9f347a940a","user":{"login":"echase6","id":11952269,"avatar_url":"https://avatars.githubusercontent.com/u/11952269?v=3","gravatar_id":"","url":"https://api.github.com/users/echase6","html_url":"https://github.com/echase6","followers_url":"https://api.github.com/users/echase6/followers","following_url":"https://api.github.com/users/echase6/following{/other_user}","gists_url":"https://api.github.com/users/echase6/gists{/gist_id}","starred_url":"https://api.github.com/users/echase6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echase6/subscriptions","organizations_url":"https://api.github.com/users/echase6/orgs","repos_url":"https://api.github.com/users/echase6/repos","events_url":"https://api.github.com/users/echase6/events{/privacy}","received_events_url":"https://api.github.com/users/echase6/received_events","type":"User","site_admin":false},"body":"Might want to mention here that, in addition to returning the card this function modifies the deck in-place.  That is half of the function here.","created_at":"2016-07-30T16:53:00Z","updated_at":"2016-07-30T16:53:00Z","html_url":"https://github.com/echase6/network_poker/pull/3#discussion_r72890686","pull_request_url":"https://api.github.com/repos/echase6/network_poker/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/echase6/network_poker/pulls/comments/72890686"},"html":{"href":"https://github.com/echase6/network_poker/pull/3#discussion_r72890686"},"pull_request":{"href":"https://api.github.com/repos/echase6/network_poker/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/echase6/network_poker/pulls/3","id":79392817,"html_url":"https://github.com/echase6/network_poker/pull/3","diff_url":"https://github.com/echase6/network_poker/pull/3.diff","patch_url":"https://github.com/echase6/network_poker/pull/3.patch","issue_url":"https://api.github.com/repos/echase6/network_poker/issues/3","number":3,"state":"open","locked":false,"title":"new initial commit","user":{"login":"stephenmuller","id":20360922,"avatar_url":"https://avatars.githubusercontent.com/u/20360922?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenmuller","html_url":"https://github.com/stephenmuller","followers_url":"https://api.github.com/users/stephenmuller/followers","following_url":"https://api.github.com/users/stephenmuller/following{/other_user}","gists_url":"https://api.github.com/users/stephenmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenmuller/subscriptions","organizations_url":"https://api.github.com/users/stephenmuller/orgs","repos_url":"https://api.github.com/users/stephenmuller/repos","events_url":"https://api.github.com/users/stephenmuller/events{/privacy}","received_events_url":"https://api.github.com/users/stephenmuller/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-29T17:15:05Z","updated_at":"2016-07-30T16:53:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b93c76e0ce355290301bffe958d944550ea1975","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/echase6/network_poker/pulls/3/commits","review_comments_url":"https://api.github.com/repos/echase6/network_poker/pulls/3/comments","review_comment_url":"https://api.github.com/repos/echase6/network_poker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/echase6/network_poker/issues/3/comments","statuses_url":"https://api.github.com/repos/echase6/network_poker/statuses/96c5774ea624ec6815466eac19443e9f347a940a","head":{"label":"echase6:card_classes","ref":"card_classes","sha":"96c5774ea624ec6815466eac19443e9f347a940a","user":{"login":"echase6","id":11952269,"avatar_url":"https://avatars.githubusercontent.com/u/11952269?v=3","gravatar_id":"","url":"https://api.github.com/users/echase6","html_url":"https://github.com/echase6","followers_url":"https://api.github.com/users/echase6/followers","following_url":"https://api.github.com/users/echase6/following{/other_user}","gists_url":"https://api.github.com/users/echase6/gists{/gist_id}","starred_url":"https://api.github.com/users/echase6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echase6/subscriptions","organizations_url":"https://api.github.com/users/echase6/orgs","repos_url":"https://api.github.com/users/echase6/repos","events_url":"https://api.github.com/users/echase6/events{/privacy}","received_events_url":"https://api.github.com/users/echase6/received_events","type":"User","site_admin":false},"repo":{"id":64344582,"name":"network_poker","full_name":"echase6/network_poker","owner":{"login":"echase6","id":11952269,"avatar_url":"https://avatars.githubusercontent.com/u/11952269?v=3","gravatar_id":"","url":"https://api.github.com/users/echase6","html_url":"https://github.com/echase6","followers_url":"https://api.github.com/users/echase6/followers","following_url":"https://api.github.com/users/echase6/following{/other_user}","gists_url":"https://api.github.com/users/echase6/gists{/gist_id}","starred_url":"https://api.github.com/users/echase6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echase6/subscriptions","organizations_url":"https://api.github.com/users/echase6/orgs","repos_url":"https://api.github.com/users/echase6/repos","events_url":"https://api.github.com/users/echase6/events{/privacy}","received_events_url":"https://api.github.com/users/echase6/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/echase6/network_poker","description":null,"fork":false,"url":"https://api.github.com/repos/echase6/network_poker","forks_url":"https://api.github.com/repos/echase6/network_poker/forks","keys_url":"https://api.github.com/repos/echase6/network_poker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/echase6/network_poker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/echase6/network_poker/teams","hooks_url":"https://api.github.com/repos/echase6/network_poker/hooks","issue_events_url":"https://api.github.com/repos/echase6/network_poker/issues/events{/number}","events_url":"https://api.github.com/repos/echase6/network_poker/events","assignees_url":"https://api.github.com/repos/echase6/network_poker/assignees{/user}","branches_url":"https://api.github.com/repos/echase6/network_poker/branches{/branch}","tags_url":"https://api.github.com/repos/echase6/network_poker/tags","blobs_url":"https://api.github.com/repos/echase6/network_poker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/echase6/network_poker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/echase6/network_poker/git/refs{/sha}","trees_url":"https://api.github.com/repos/echase6/network_poker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/echase6/network_poker/statuses/{sha}","languages_url":"https://api.github.com/repos/echase6/network_poker/languages","stargazers_url":"https://api.github.com/repos/echase6/network_poker/stargazers","contributors_url":"https://api.github.com/repos/echase6/network_poker/contributors","subscribers_url":"https://api.github.com/repos/echase6/network_poker/subscribers","subscription_url":"https://api.github.com/repos/echase6/network_poker/subscription","commits_url":"https://api.github.com/repos/echase6/network_poker/commits{/sha}","git_commits_url":"https://api.github.com/repos/echase6/network_poker/git/commits{/sha}","comments_url":"https://api.github.com/repos/echase6/network_poker/comments{/number}","issue_comment_url":"https://api.github.com/repos/echase6/network_poker/issues/comments{/number}","contents_url":"https://api.github.com/repos/echase6/network_poker/contents/{+path}","compare_url":"https://api.github.com/repos/echase6/network_poker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/echase6/network_poker/merges","archive_url":"https://api.github.com/repos/echase6/network_poker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/echase6/network_poker/downloads","issues_url":"https://api.github.com/repos/echase6/network_poker/issues{/number}","pulls_url":"https://api.github.com/repos/echase6/network_poker/pulls{/number}","milestones_url":"https://api.github.com/repos/echase6/network_poker/milestones{/number}","notifications_url":"https://api.github.com/repos/echase6/network_poker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/echase6/network_poker/labels{/name}","releases_url":"https://api.github.com/repos/echase6/network_poker/releases{/id}","deployments_url":"https://api.github.com/repos/echase6/network_poker/deployments","created_at":"2016-07-27T22:00:53Z","updated_at":"2016-07-29T22:05:00Z","pushed_at":"2016-07-30T02:21:18Z","git_url":"git://github.com/echase6/network_poker.git","ssh_url":"git@github.com:echase6/network_poker.git","clone_url":"https://github.com/echase6/network_poker.git","svn_url":"https://github.com/echase6/network_poker","homepage":null,"size":31,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"echase6:master","ref":"master","sha":"97539af46f694fa7e7c15162f02a185cd98fbd00","user":{"login":"echase6","id":11952269,"avatar_url":"https://avatars.githubusercontent.com/u/11952269?v=3","gravatar_id":"","url":"https://api.github.com/users/echase6","html_url":"https://github.com/echase6","followers_url":"https://api.github.com/users/echase6/followers","following_url":"https://api.github.com/users/echase6/following{/other_user}","gists_url":"https://api.github.com/users/echase6/gists{/gist_id}","starred_url":"https://api.github.com/users/echase6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echase6/subscriptions","organizations_url":"https://api.github.com/users/echase6/orgs","repos_url":"https://api.github.com/users/echase6/repos","events_url":"https://api.github.com/users/echase6/events{/privacy}","received_events_url":"https://api.github.com/users/echase6/received_events","type":"User","site_admin":false},"repo":{"id":64344582,"name":"network_poker","full_name":"echase6/network_poker","owner":{"login":"echase6","id":11952269,"avatar_url":"https://avatars.githubusercontent.com/u/11952269?v=3","gravatar_id":"","url":"https://api.github.com/users/echase6","html_url":"https://github.com/echase6","followers_url":"https://api.github.com/users/echase6/followers","following_url":"https://api.github.com/users/echase6/following{/other_user}","gists_url":"https://api.github.com/users/echase6/gists{/gist_id}","starred_url":"https://api.github.com/users/echase6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echase6/subscriptions","organizations_url":"https://api.github.com/users/echase6/orgs","repos_url":"https://api.github.com/users/echase6/repos","events_url":"https://api.github.com/users/echase6/events{/privacy}","received_events_url":"https://api.github.com/users/echase6/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/echase6/network_poker","description":null,"fork":false,"url":"https://api.github.com/repos/echase6/network_poker","forks_url":"https://api.github.com/repos/echase6/network_poker/forks","keys_url":"https://api.github.com/repos/echase6/network_poker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/echase6/network_poker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/echase6/network_poker/teams","hooks_url":"https://api.github.com/repos/echase6/network_poker/hooks","issue_events_url":"https://api.github.com/repos/echase6/network_poker/issues/events{/number}","events_url":"https://api.github.com/repos/echase6/network_poker/events","assignees_url":"https://api.github.com/repos/echase6/network_poker/assignees{/user}","branches_url":"https://api.github.com/repos/echase6/network_poker/branches{/branch}","tags_url":"https://api.github.com/repos/echase6/network_poker/tags","blobs_url":"https://api.github.com/repos/echase6/network_poker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/echase6/network_poker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/echase6/network_poker/git/refs{/sha}","trees_url":"https://api.github.com/repos/echase6/network_poker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/echase6/network_poker/statuses/{sha}","languages_url":"https://api.github.com/repos/echase6/network_poker/languages","stargazers_url":"https://api.github.com/repos/echase6/network_poker/stargazers","contributors_url":"https://api.github.com/repos/echase6/network_poker/contributors","subscribers_url":"https://api.github.com/repos/echase6/network_poker/subscribers","subscription_url":"https://api.github.com/repos/echase6/network_poker/subscription","commits_url":"https://api.github.com/repos/echase6/network_poker/commits{/sha}","git_commits_url":"https://api.github.com/repos/echase6/network_poker/git/commits{/sha}","comments_url":"https://api.github.com/repos/echase6/network_poker/comments{/number}","issue_comment_url":"https://api.github.com/repos/echase6/network_poker/issues/comments{/number}","contents_url":"https://api.github.com/repos/echase6/network_poker/contents/{+path}","compare_url":"https://api.github.com/repos/echase6/network_poker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/echase6/network_poker/merges","archive_url":"https://api.github.com/repos/echase6/network_poker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/echase6/network_poker/downloads","issues_url":"https://api.github.com/repos/echase6/network_poker/issues{/number}","pulls_url":"https://api.github.com/repos/echase6/network_poker/pulls{/number}","milestones_url":"https://api.github.com/repos/echase6/network_poker/milestones{/number}","notifications_url":"https://api.github.com/repos/echase6/network_poker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/echase6/network_poker/labels{/name}","releases_url":"https://api.github.com/repos/echase6/network_poker/releases{/id}","deployments_url":"https://api.github.com/repos/echase6/network_poker/deployments","created_at":"2016-07-27T22:00:53Z","updated_at":"2016-07-29T22:05:00Z","pushed_at":"2016-07-30T02:21:18Z","git_url":"git://github.com/echase6/network_poker.git","ssh_url":"git@github.com:echase6/network_poker.git","clone_url":"https://github.com/echase6/network_poker.git","svn_url":"https://github.com/echase6/network_poker","homepage":null,"size":31,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/echase6/network_poker/pulls/3"},"html":{"href":"https://github.com/echase6/network_poker/pull/3"},"issue":{"href":"https://api.github.com/repos/echase6/network_poker/issues/3"},"comments":{"href":"https://api.github.com/repos/echase6/network_poker/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/echase6/network_poker/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/echase6/network_poker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/echase6/network_poker/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/echase6/network_poker/statuses/96c5774ea624ec6815466eac19443e9f347a940a"}}}}
{"actor":{"display_login":"echase6"}}