{"action":"created","comment":{"url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/comments/176912039","pull_request_review_id":106701899,"id":176912039,"diff_hunk":"@@ -25,9 +27,27 @@ public static void startTournament(Session user) throws IOException {\n       tableResponseData.setSuccess(true);\n       tableResponseData.setTable(Api.testTable);\n       response.setData(tableResponseData);\n-\n       UserService.sendAll(gson.toJson(response));\n+      sendHoleCards();\n+    }\n+  }\n+\n+  public static void sendHoleCards() {","path":"backend/src/main/java/poker/services/gameplay/GameService.java","position":19,"original_position":19,"commit_id":"5850b2241d95b7601b332e34d8dd2894f64fdf51","original_commit_id":"5850b2241d95b7601b332e34d8dd2894f64fdf51","user":{"login":"ericliu121187","id":935795,"avatar_url":"https://avatars2.githubusercontent.com/u/935795?v=4","gravatar_id":"","url":"https://api.github.com/users/ericliu121187","html_url":"https://github.com/ericliu121187","followers_url":"https://api.github.com/users/ericliu121187/followers","following_url":"https://api.github.com/users/ericliu121187/following{/other_user}","gists_url":"https://api.github.com/users/ericliu121187/gists{/gist_id}","starred_url":"https://api.github.com/users/ericliu121187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericliu121187/subscriptions","organizations_url":"https://api.github.com/users/ericliu121187/orgs","repos_url":"https://api.github.com/users/ericliu121187/repos","events_url":"https://api.github.com/users/ericliu121187/events{/privacy}","received_events_url":"https://api.github.com/users/ericliu121187/received_events","type":"User","site_admin":false},"body":"`deliverHoleCards` as to be in line with the messageType?","created_at":"2018-03-24T15:27:04Z","updated_at":"2018-03-24T15:44:58Z","html_url":"https://github.com/ericliu121187/short-deck-poker/pull/46#discussion_r176912039","pull_request_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/comments/176912039"},"html":{"href":"https://github.com/ericliu121187/short-deck-poker/pull/46#discussion_r176912039"},"pull_request":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46","id":177221251,"html_url":"https://github.com/ericliu121187/short-deck-poker/pull/46","diff_url":"https://github.com/ericliu121187/short-deck-poker/pull/46.diff","patch_url":"https://github.com/ericliu121187/short-deck-poker/pull/46.patch","issue_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/46","number":46,"state":"open","locked":false,"title":"Blinds","user":{"login":"teddylo57","id":10196487,"avatar_url":"https://avatars3.githubusercontent.com/u/10196487?v=4","gravatar_id":"","url":"https://api.github.com/users/teddylo57","html_url":"https://github.com/teddylo57","followers_url":"https://api.github.com/users/teddylo57/followers","following_url":"https://api.github.com/users/teddylo57/following{/other_user}","gists_url":"https://api.github.com/users/teddylo57/gists{/gist_id}","starred_url":"https://api.github.com/users/teddylo57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teddylo57/subscriptions","organizations_url":"https://api.github.com/users/teddylo57/orgs","repos_url":"https://api.github.com/users/teddylo57/repos","events_url":"https://api.github.com/users/teddylo57/events{/privacy}","received_events_url":"https://api.github.com/users/teddylo57/received_events","type":"User","site_admin":false},"body":"I added big blinds and small blinds to the table. I'm guessing the next card will be a `MoneyService` or `Bank` in which it actually deducts the sb/bb from users and adds it to a `pot` field for `table`. It should also handle `betting` but I guess we can discuss that before you create a card.\r\n\r\n**Main changes:**\r\nI made a constructor for `Deck` because as a singleton wouldn't make sense with multiple tables. Along with the fact that each `hand` will be using a fresh deck, no sense in keeping a shared deck.\r\n\r\nAdded the table websocket `ws_hand_start` syncs all active players with the starting table information.\r\n\r\nThen `ws_deliver_hole_cards` will send each individual player their hole cards. I think it's a good idea, since everything else will be in a shared state with the table. The only unique piece of data would be the hole cards, so it makes sense to send them separately.\r\n\r\nI fixed some tests and added some for button and blind logic.\r\n\r\nExamples of table data: \r\n```\r\n{\"data\":{\"success\":true,\"table\":{\"name\":\"SDP 10 ETH tournament\",\"id\":1,\"seats\":[{\"seatNumber\":1},{\"seatNumber\":2},{\"seatNumber\":3},{\"player\":{\"username\":\"ted\",\"chips\":20000},\"seatNumber\":4},{\"player\":{\"username\":\"bob\",\"chips\":20000},\"seatNumber\":5},{\"seatNumber\":6},{\"seatNumber\":7},{\"seatNumber\":8}],\"playerSize\":2,\"hand\":{\"tableName\":\"SDP 10 ETH tournament\",\"handId\":0,\"burnList\":[],\"flop\":[]},\"button\":{\"player\":{\"username\":\"ted\",\"chips\":20000},\"seatNumber\":4},\"blinds\":{\"smallBlind\":{\"amount\":25,\"player\":{\"username\":\"ted\",\"chips\":20000}},\"bigBlind\":{\"amount\":50,\"player\":{\"username\":\"bob\",\"chips\":20000}}},\"pot\":{\"pot\":0}}},\"type\":\"WS_HAND_START\"}\r\n```\r\n\r\nExamples of Card data:\r\n```\r\n{\"data\":{\"success\":true,\"dealtHand\":{\"card1\":{\"suit\":\"HEART\",\"rank\":\"J\"},\"card2\":{\"suit\":\"SPADE\",\"rank\":\"SEVEN\"}}},\"type\":\"WS_DELIVER_HOLE_CARDS\"}\r\n```\r\n\r\n```\r\n{\"data\":{\"success\":true,\"dealtHand\":{\"card1\":{\"suit\":\"CLOVER\",\"rank\":\"NINE\"},\"card2\":{\"suit\":\"DIAMOND\",\"rank\":\"A\"}}},\"type\":\"WS_DELIVER_HOLE_CARDS\"}\r\n```\r\n\r\nI was able to test and verify these JSON websocket messages. I think this takes us a lot closer to being to start a tournament game.\r\n","created_at":"2018-03-24T05:11:58Z","updated_at":"2018-03-24T15:44:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13fe3bab7a878bd2cc7edf488c5fab5ce14ea529","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":834667926,"url":"https://api.github.com/repos/ericliu121187/short-deck-poker/labels/backend","name":"backend","color":"005dd8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46/commits","review_comments_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46/comments","review_comment_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/46/comments","statuses_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/statuses/5850b2241d95b7601b332e34d8dd2894f64fdf51","head":{"label":"ericliu121187:blinds","ref":"blinds","sha":"5850b2241d95b7601b332e34d8dd2894f64fdf51","user":{"login":"ericliu121187","id":935795,"avatar_url":"https://avatars2.githubusercontent.com/u/935795?v=4","gravatar_id":"","url":"https://api.github.com/users/ericliu121187","html_url":"https://github.com/ericliu121187","followers_url":"https://api.github.com/users/ericliu121187/followers","following_url":"https://api.github.com/users/ericliu121187/following{/other_user}","gists_url":"https://api.github.com/users/ericliu121187/gists{/gist_id}","starred_url":"https://api.github.com/users/ericliu121187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericliu121187/subscriptions","organizations_url":"https://api.github.com/users/ericliu121187/orgs","repos_url":"https://api.github.com/users/ericliu121187/repos","events_url":"https://api.github.com/users/ericliu121187/events{/privacy}","received_events_url":"https://api.github.com/users/ericliu121187/received_events","type":"User","site_admin":false},"repo":{"id":119536882,"name":"short-deck-poker","full_name":"ericliu121187/short-deck-poker","owner":{"login":"ericliu121187","id":935795,"avatar_url":"https://avatars2.githubusercontent.com/u/935795?v=4","gravatar_id":"","url":"https://api.github.com/users/ericliu121187","html_url":"https://github.com/ericliu121187","followers_url":"https://api.github.com/users/ericliu121187/followers","following_url":"https://api.github.com/users/ericliu121187/following{/other_user}","gists_url":"https://api.github.com/users/ericliu121187/gists{/gist_id}","starred_url":"https://api.github.com/users/ericliu121187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericliu121187/subscriptions","organizations_url":"https://api.github.com/users/ericliu121187/orgs","repos_url":"https://api.github.com/users/ericliu121187/repos","events_url":"https://api.github.com/users/ericliu121187/events{/privacy}","received_events_url":"https://api.github.com/users/ericliu121187/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericliu121187/short-deck-poker","description":"Short Deck Poker","fork":false,"url":"https://api.github.com/repos/ericliu121187/short-deck-poker","forks_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/forks","keys_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/teams","hooks_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/hooks","issue_events_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/events{/number}","events_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/events","assignees_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/assignees{/user}","branches_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/branches{/branch}","tags_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/tags","blobs_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/statuses/{sha}","languages_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/languages","stargazers_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/stargazers","contributors_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/contributors","subscribers_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/subscribers","subscription_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/subscription","commits_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/contents/{+path}","compare_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/merges","archive_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/downloads","issues_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues{/number}","pulls_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls{/number}","milestones_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/milestones{/number}","notifications_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/labels{/name}","releases_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/releases{/id}","deployments_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/deployments","created_at":"2018-01-30T13:04:41Z","updated_at":"2018-03-23T19:29:19Z","pushed_at":"2018-03-24T05:35:15Z","git_url":"git://github.com/ericliu121187/short-deck-poker.git","ssh_url":"git@github.com:ericliu121187/short-deck-poker.git","clone_url":"https://github.com/ericliu121187/short-deck-poker.git","svn_url":"https://github.com/ericliu121187/short-deck-poker","homepage":"","size":789,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ericliu121187:master","ref":"master","sha":"ed9c658965b0a43be75ef52936935e2b5bdd7825","user":{"login":"ericliu121187","id":935795,"avatar_url":"https://avatars2.githubusercontent.com/u/935795?v=4","gravatar_id":"","url":"https://api.github.com/users/ericliu121187","html_url":"https://github.com/ericliu121187","followers_url":"https://api.github.com/users/ericliu121187/followers","following_url":"https://api.github.com/users/ericliu121187/following{/other_user}","gists_url":"https://api.github.com/users/ericliu121187/gists{/gist_id}","starred_url":"https://api.github.com/users/ericliu121187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericliu121187/subscriptions","organizations_url":"https://api.github.com/users/ericliu121187/orgs","repos_url":"https://api.github.com/users/ericliu121187/repos","events_url":"https://api.github.com/users/ericliu121187/events{/privacy}","received_events_url":"https://api.github.com/users/ericliu121187/received_events","type":"User","site_admin":false},"repo":{"id":119536882,"name":"short-deck-poker","full_name":"ericliu121187/short-deck-poker","owner":{"login":"ericliu121187","id":935795,"avatar_url":"https://avatars2.githubusercontent.com/u/935795?v=4","gravatar_id":"","url":"https://api.github.com/users/ericliu121187","html_url":"https://github.com/ericliu121187","followers_url":"https://api.github.com/users/ericliu121187/followers","following_url":"https://api.github.com/users/ericliu121187/following{/other_user}","gists_url":"https://api.github.com/users/ericliu121187/gists{/gist_id}","starred_url":"https://api.github.com/users/ericliu121187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericliu121187/subscriptions","organizations_url":"https://api.github.com/users/ericliu121187/orgs","repos_url":"https://api.github.com/users/ericliu121187/repos","events_url":"https://api.github.com/users/ericliu121187/events{/privacy}","received_events_url":"https://api.github.com/users/ericliu121187/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericliu121187/short-deck-poker","description":"Short Deck Poker","fork":false,"url":"https://api.github.com/repos/ericliu121187/short-deck-poker","forks_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/forks","keys_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/teams","hooks_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/hooks","issue_events_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/events{/number}","events_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/events","assignees_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/assignees{/user}","branches_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/branches{/branch}","tags_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/tags","blobs_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/statuses/{sha}","languages_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/languages","stargazers_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/stargazers","contributors_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/contributors","subscribers_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/subscribers","subscription_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/subscription","commits_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/contents/{+path}","compare_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/merges","archive_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/downloads","issues_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues{/number}","pulls_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls{/number}","milestones_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/milestones{/number}","notifications_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/labels{/name}","releases_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/releases{/id}","deployments_url":"https://api.github.com/repos/ericliu121187/short-deck-poker/deployments","created_at":"2018-01-30T13:04:41Z","updated_at":"2018-03-23T19:29:19Z","pushed_at":"2018-03-24T05:35:15Z","git_url":"git://github.com/ericliu121187/short-deck-poker.git","ssh_url":"git@github.com:ericliu121187/short-deck-poker.git","clone_url":"https://github.com/ericliu121187/short-deck-poker.git","svn_url":"https://github.com/ericliu121187/short-deck-poker","homepage":"","size":789,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46"},"html":{"href":"https://github.com/ericliu121187/short-deck-poker/pull/46"},"issue":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/46"},"comments":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/ericliu121187/short-deck-poker/statuses/5850b2241d95b7601b332e34d8dd2894f64fdf51"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ericliu121187"}}