{"action":"created","comment":{"url":"https://api.github.com/repos/askrynnikov/blackjack/pulls/comments/90673960","pull_request_review_id":11181926,"id":90673960,"diff_hunk":"@@ -0,0 +1,90 @@\n+require_relative 'lib/card'\n+require_relative 'lib/desk/desk52'\n+require_relative 'lib/rules_blackjack'\n+require_relative 'lib/party'\n+require_relative 'lib/bank'\n+\n+include RulesBlackjack\n+\n+deck = Deck52.new\n+money = 100\n+bank = Bank.new\n+\n+puts 'Play Blackjack'\n+print 'Enter your name: '\n+player_name = gets.chomp\n+player = Party.new(player_name, money)\n+dealer = Party.new('Casino', money)\n+\n+loop do\n+  if player.amount < 10\n+    puts 'You have insufficient funds to bet.'\n+    break\n+  end\n+  if dealer.amount < 10\n+    puts 'At the casino is not enough money.'\n+    break\n+  end\n+\n+  deck.shuffle!\n+  bank.push(player.bet(10))\n+  bank.push(dealer.bet(10))\n+\n+  player.hand(deck.pop)\n+  player.hand(deck.pop)\n+  dealer.hand(deck.pop)\n+  dealer.hand(deck.pop)\n+\n+  loop do\n+    puts \"You have on the cards: #{player.show_cards}, points: #{player.points}\"\n+    puts \"Casino have on the cards: #{dealer.show_hidden_cards}\"\n+    puts <<-MENU\n+\n+Action choice\n+1 - skip\n+2 - add\n+3 - open\n+    MENU\n+    choice = gets.strip\n+    break if choice == '3'","path":"main.rb","position":49,"original_position":49,"commit_id":"ecf8e61c3dcc1679b19765ed6d199902662042b8","original_commit_id":"ecf8e61c3dcc1679b19765ed6d199902662042b8","user":{"login":"psylone","id":224141,"avatar_url":"https://avatars.githubusercontent.com/u/224141?v=3","gravatar_id":"","url":"https://api.github.com/users/psylone","html_url":"https://github.com/psylone","followers_url":"https://api.github.com/users/psylone/followers","following_url":"https://api.github.com/users/psylone/following{/other_user}","gists_url":"https://api.github.com/users/psylone/gists{/gist_id}","starred_url":"https://api.github.com/users/psylone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psylone/subscriptions","organizations_url":"https://api.github.com/users/psylone/orgs","repos_url":"https://api.github.com/users/psylone/repos","events_url":"https://api.github.com/users/psylone/events{/privacy}","received_events_url":"https://api.github.com/users/psylone/received_events","type":"User","site_admin":false},"body":"Это лучше сделать через `case`.","created_at":"2016-12-02T16:30:43Z","updated_at":"2016-12-02T16:30:43Z","html_url":"https://github.com/askrynnikov/blackjack/pull/1#discussion_r90673960","pull_request_url":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/askrynnikov/blackjack/pulls/comments/90673960"},"html":{"href":"https://github.com/askrynnikov/blackjack/pull/1#discussion_r90673960"},"pull_request":{"href":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1","id":96159054,"html_url":"https://github.com/askrynnikov/blackjack/pull/1","diff_url":"https://github.com/askrynnikov/blackjack/pull/1.diff","patch_url":"https://github.com/askrynnikov/blackjack/pull/1.patch","issue_url":"https://api.github.com/repos/askrynnikov/blackjack/issues/1","number":1,"state":"open","locked":false,"title":"v 0.1","user":{"login":"askrynnikov","id":12831700,"avatar_url":"https://avatars.githubusercontent.com/u/12831700?v=3","gravatar_id":"","url":"https://api.github.com/users/askrynnikov","html_url":"https://github.com/askrynnikov","followers_url":"https://api.github.com/users/askrynnikov/followers","following_url":"https://api.github.com/users/askrynnikov/following{/other_user}","gists_url":"https://api.github.com/users/askrynnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/askrynnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askrynnikov/subscriptions","organizations_url":"https://api.github.com/users/askrynnikov/orgs","repos_url":"https://api.github.com/users/askrynnikov/repos","events_url":"https://api.github.com/users/askrynnikov/events{/privacy}","received_events_url":"https://api.github.com/users/askrynnikov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-01T19:58:11Z","updated_at":"2016-12-02T16:32:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d504a57253b30b081a94ca6668df0b2df711095c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1/commits","review_comments_url":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1/comments","review_comment_url":"https://api.github.com/repos/askrynnikov/blackjack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/askrynnikov/blackjack/issues/1/comments","statuses_url":"https://api.github.com/repos/askrynnikov/blackjack/statuses/ecf8e61c3dcc1679b19765ed6d199902662042b8","head":{"label":"askrynnikov:develop","ref":"develop","sha":"ecf8e61c3dcc1679b19765ed6d199902662042b8","user":{"login":"askrynnikov","id":12831700,"avatar_url":"https://avatars.githubusercontent.com/u/12831700?v=3","gravatar_id":"","url":"https://api.github.com/users/askrynnikov","html_url":"https://github.com/askrynnikov","followers_url":"https://api.github.com/users/askrynnikov/followers","following_url":"https://api.github.com/users/askrynnikov/following{/other_user}","gists_url":"https://api.github.com/users/askrynnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/askrynnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askrynnikov/subscriptions","organizations_url":"https://api.github.com/users/askrynnikov/orgs","repos_url":"https://api.github.com/users/askrynnikov/repos","events_url":"https://api.github.com/users/askrynnikov/events{/privacy}","received_events_url":"https://api.github.com/users/askrynnikov/received_events","type":"User","site_admin":false},"repo":{"id":75264553,"name":"blackjack","full_name":"askrynnikov/blackjack","owner":{"login":"askrynnikov","id":12831700,"avatar_url":"https://avatars.githubusercontent.com/u/12831700?v=3","gravatar_id":"","url":"https://api.github.com/users/askrynnikov","html_url":"https://github.com/askrynnikov","followers_url":"https://api.github.com/users/askrynnikov/followers","following_url":"https://api.github.com/users/askrynnikov/following{/other_user}","gists_url":"https://api.github.com/users/askrynnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/askrynnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askrynnikov/subscriptions","organizations_url":"https://api.github.com/users/askrynnikov/orgs","repos_url":"https://api.github.com/users/askrynnikov/repos","events_url":"https://api.github.com/users/askrynnikov/events{/privacy}","received_events_url":"https://api.github.com/users/askrynnikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/askrynnikov/blackjack","description":"card game Blackjack","fork":false,"url":"https://api.github.com/repos/askrynnikov/blackjack","forks_url":"https://api.github.com/repos/askrynnikov/blackjack/forks","keys_url":"https://api.github.com/repos/askrynnikov/blackjack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/askrynnikov/blackjack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/askrynnikov/blackjack/teams","hooks_url":"https://api.github.com/repos/askrynnikov/blackjack/hooks","issue_events_url":"https://api.github.com/repos/askrynnikov/blackjack/issues/events{/number}","events_url":"https://api.github.com/repos/askrynnikov/blackjack/events","assignees_url":"https://api.github.com/repos/askrynnikov/blackjack/assignees{/user}","branches_url":"https://api.github.com/repos/askrynnikov/blackjack/branches{/branch}","tags_url":"https://api.github.com/repos/askrynnikov/blackjack/tags","blobs_url":"https://api.github.com/repos/askrynnikov/blackjack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/askrynnikov/blackjack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/askrynnikov/blackjack/git/refs{/sha}","trees_url":"https://api.github.com/repos/askrynnikov/blackjack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/askrynnikov/blackjack/statuses/{sha}","languages_url":"https://api.github.com/repos/askrynnikov/blackjack/languages","stargazers_url":"https://api.github.com/repos/askrynnikov/blackjack/stargazers","contributors_url":"https://api.github.com/repos/askrynnikov/blackjack/contributors","subscribers_url":"https://api.github.com/repos/askrynnikov/blackjack/subscribers","subscription_url":"https://api.github.com/repos/askrynnikov/blackjack/subscription","commits_url":"https://api.github.com/repos/askrynnikov/blackjack/commits{/sha}","git_commits_url":"https://api.github.com/repos/askrynnikov/blackjack/git/commits{/sha}","comments_url":"https://api.github.com/repos/askrynnikov/blackjack/comments{/number}","issue_comment_url":"https://api.github.com/repos/askrynnikov/blackjack/issues/comments{/number}","contents_url":"https://api.github.com/repos/askrynnikov/blackjack/contents/{+path}","compare_url":"https://api.github.com/repos/askrynnikov/blackjack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/askrynnikov/blackjack/merges","archive_url":"https://api.github.com/repos/askrynnikov/blackjack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/askrynnikov/blackjack/downloads","issues_url":"https://api.github.com/repos/askrynnikov/blackjack/issues{/number}","pulls_url":"https://api.github.com/repos/askrynnikov/blackjack/pulls{/number}","milestones_url":"https://api.github.com/repos/askrynnikov/blackjack/milestones{/number}","notifications_url":"https://api.github.com/repos/askrynnikov/blackjack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/askrynnikov/blackjack/labels{/name}","releases_url":"https://api.github.com/repos/askrynnikov/blackjack/releases{/id}","deployments_url":"https://api.github.com/repos/askrynnikov/blackjack/deployments","created_at":"2016-12-01T06:54:57Z","updated_at":"2016-12-02T15:23:38Z","pushed_at":"2016-12-02T04:48:22Z","git_url":"git://github.com/askrynnikov/blackjack.git","ssh_url":"git@github.com:askrynnikov/blackjack.git","clone_url":"https://github.com/askrynnikov/blackjack.git","svn_url":"https://github.com/askrynnikov/blackjack","homepage":null,"size":7,"stargazers_count":1,"watchers_count":1,"language":null,"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":"askrynnikov:master","ref":"master","sha":"e7720c7c1a6cf3e7f0efabc4a8ff3d5336a69087","user":{"login":"askrynnikov","id":12831700,"avatar_url":"https://avatars.githubusercontent.com/u/12831700?v=3","gravatar_id":"","url":"https://api.github.com/users/askrynnikov","html_url":"https://github.com/askrynnikov","followers_url":"https://api.github.com/users/askrynnikov/followers","following_url":"https://api.github.com/users/askrynnikov/following{/other_user}","gists_url":"https://api.github.com/users/askrynnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/askrynnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askrynnikov/subscriptions","organizations_url":"https://api.github.com/users/askrynnikov/orgs","repos_url":"https://api.github.com/users/askrynnikov/repos","events_url":"https://api.github.com/users/askrynnikov/events{/privacy}","received_events_url":"https://api.github.com/users/askrynnikov/received_events","type":"User","site_admin":false},"repo":{"id":75264553,"name":"blackjack","full_name":"askrynnikov/blackjack","owner":{"login":"askrynnikov","id":12831700,"avatar_url":"https://avatars.githubusercontent.com/u/12831700?v=3","gravatar_id":"","url":"https://api.github.com/users/askrynnikov","html_url":"https://github.com/askrynnikov","followers_url":"https://api.github.com/users/askrynnikov/followers","following_url":"https://api.github.com/users/askrynnikov/following{/other_user}","gists_url":"https://api.github.com/users/askrynnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/askrynnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askrynnikov/subscriptions","organizations_url":"https://api.github.com/users/askrynnikov/orgs","repos_url":"https://api.github.com/users/askrynnikov/repos","events_url":"https://api.github.com/users/askrynnikov/events{/privacy}","received_events_url":"https://api.github.com/users/askrynnikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/askrynnikov/blackjack","description":"card game Blackjack","fork":false,"url":"https://api.github.com/repos/askrynnikov/blackjack","forks_url":"https://api.github.com/repos/askrynnikov/blackjack/forks","keys_url":"https://api.github.com/repos/askrynnikov/blackjack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/askrynnikov/blackjack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/askrynnikov/blackjack/teams","hooks_url":"https://api.github.com/repos/askrynnikov/blackjack/hooks","issue_events_url":"https://api.github.com/repos/askrynnikov/blackjack/issues/events{/number}","events_url":"https://api.github.com/repos/askrynnikov/blackjack/events","assignees_url":"https://api.github.com/repos/askrynnikov/blackjack/assignees{/user}","branches_url":"https://api.github.com/repos/askrynnikov/blackjack/branches{/branch}","tags_url":"https://api.github.com/repos/askrynnikov/blackjack/tags","blobs_url":"https://api.github.com/repos/askrynnikov/blackjack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/askrynnikov/blackjack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/askrynnikov/blackjack/git/refs{/sha}","trees_url":"https://api.github.com/repos/askrynnikov/blackjack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/askrynnikov/blackjack/statuses/{sha}","languages_url":"https://api.github.com/repos/askrynnikov/blackjack/languages","stargazers_url":"https://api.github.com/repos/askrynnikov/blackjack/stargazers","contributors_url":"https://api.github.com/repos/askrynnikov/blackjack/contributors","subscribers_url":"https://api.github.com/repos/askrynnikov/blackjack/subscribers","subscription_url":"https://api.github.com/repos/askrynnikov/blackjack/subscription","commits_url":"https://api.github.com/repos/askrynnikov/blackjack/commits{/sha}","git_commits_url":"https://api.github.com/repos/askrynnikov/blackjack/git/commits{/sha}","comments_url":"https://api.github.com/repos/askrynnikov/blackjack/comments{/number}","issue_comment_url":"https://api.github.com/repos/askrynnikov/blackjack/issues/comments{/number}","contents_url":"https://api.github.com/repos/askrynnikov/blackjack/contents/{+path}","compare_url":"https://api.github.com/repos/askrynnikov/blackjack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/askrynnikov/blackjack/merges","archive_url":"https://api.github.com/repos/askrynnikov/blackjack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/askrynnikov/blackjack/downloads","issues_url":"https://api.github.com/repos/askrynnikov/blackjack/issues{/number}","pulls_url":"https://api.github.com/repos/askrynnikov/blackjack/pulls{/number}","milestones_url":"https://api.github.com/repos/askrynnikov/blackjack/milestones{/number}","notifications_url":"https://api.github.com/repos/askrynnikov/blackjack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/askrynnikov/blackjack/labels{/name}","releases_url":"https://api.github.com/repos/askrynnikov/blackjack/releases{/id}","deployments_url":"https://api.github.com/repos/askrynnikov/blackjack/deployments","created_at":"2016-12-01T06:54:57Z","updated_at":"2016-12-02T15:23:38Z","pushed_at":"2016-12-02T04:48:22Z","git_url":"git://github.com/askrynnikov/blackjack.git","ssh_url":"git@github.com:askrynnikov/blackjack.git","clone_url":"https://github.com/askrynnikov/blackjack.git","svn_url":"https://github.com/askrynnikov/blackjack","homepage":null,"size":7,"stargazers_count":1,"watchers_count":1,"language":null,"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/askrynnikov/blackjack/pulls/1"},"html":{"href":"https://github.com/askrynnikov/blackjack/pull/1"},"issue":{"href":"https://api.github.com/repos/askrynnikov/blackjack/issues/1"},"comments":{"href":"https://api.github.com/repos/askrynnikov/blackjack/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/askrynnikov/blackjack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/askrynnikov/blackjack/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/askrynnikov/blackjack/statuses/ecf8e61c3dcc1679b19765ed6d199902662042b8"}}}}
{"actor":{"display_login":"psylone"}}