{"action":"created","comment":{"url":"https://api.github.com/repos/lostmap/CardGame/pulls/comments/195923239","pull_request_review_id":129383860,"id":195923239,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTkyMzIzOQ==","diff_hunk":"@@ -0,0 +1,170 @@\n+#include \"interlayer.h\"\n+\n+#include \"game.h\"\n+#include \"log.h\"\n+\n+InterLayer::InterLayer(std::shared_ptr<Game> game,\n+                       std::shared_ptr<MyServer> server):\n+    _game(game), _server(server)\n+{\n+\n+}\n+\n+InterLayer::~InterLayer() {\n+\n+    for (auto socket: _socket)\n+        delete socket.second;","path":"server/interlayer.cpp","position":19,"original_position":16,"commit_id":"99439f5c82c2f7fc4d7d05f6d1e4645a6daf1eb3","original_commit_id":"b5186f83c0ee809cba112fccbf612d6a1ac1a1fe","user":{"login":"dlipko","id":22277868,"node_id":"MDQ6VXNlcjIyMjc3ODY4","avatar_url":"https://avatars0.githubusercontent.com/u/22277868?v=4","gravatar_id":"","url":"https://api.github.com/users/dlipko","html_url":"https://github.com/dlipko","followers_url":"https://api.github.com/users/dlipko/followers","following_url":"https://api.github.com/users/dlipko/following{/other_user}","gists_url":"https://api.github.com/users/dlipko/gists{/gist_id}","starred_url":"https://api.github.com/users/dlipko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlipko/subscriptions","organizations_url":"https://api.github.com/users/dlipko/orgs","repos_url":"https://api.github.com/users/dlipko/repos","events_url":"https://api.github.com/users/dlipko/events{/privacy}","received_events_url":"https://api.github.com/users/dlipko/received_events","type":"User","site_admin":false},"body":"Уже несколько раз пытался использовать с сокетами shared_ptr. Каждый раз появляется не понятная проблема, с которой мне пока что так и не удалось разобраться.","created_at":"2018-06-17T09:18:18Z","updated_at":"2018-06-17T09:18:18Z","html_url":"https://github.com/lostmap/CardGame/pull/1#discussion_r195923239","pull_request_url":"https://api.github.com/repos/lostmap/CardGame/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/lostmap/CardGame/pulls/comments/195923239"},"html":{"href":"https://github.com/lostmap/CardGame/pull/1#discussion_r195923239"},"pull_request":{"href":"https://api.github.com/repos/lostmap/CardGame/pulls/1"}},"in_reply_to_id":195901576},"pull_request":{"url":"https://api.github.com/repos/lostmap/CardGame/pulls/1","id":188501660,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg4NTAxNjYw","html_url":"https://github.com/lostmap/CardGame/pull/1","diff_url":"https://github.com/lostmap/CardGame/pull/1.diff","patch_url":"https://github.com/lostmap/CardGame/pull/1.patch","issue_url":"https://api.github.com/repos/lostmap/CardGame/issues/1","number":1,"state":"open","locked":false,"title":"Dlipko","user":{"login":"dlipko","id":22277868,"node_id":"MDQ6VXNlcjIyMjc3ODY4","avatar_url":"https://avatars0.githubusercontent.com/u/22277868?v=4","gravatar_id":"","url":"https://api.github.com/users/dlipko","html_url":"https://github.com/dlipko","followers_url":"https://api.github.com/users/dlipko/followers","following_url":"https://api.github.com/users/dlipko/following{/other_user}","gists_url":"https://api.github.com/users/dlipko/gists{/gist_id}","starred_url":"https://api.github.com/users/dlipko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlipko/subscriptions","organizations_url":"https://api.github.com/users/dlipko/orgs","repos_url":"https://api.github.com/users/dlipko/repos","events_url":"https://api.github.com/users/dlipko/events{/privacy}","received_events_url":"https://api.github.com/users/dlipko/received_events","type":"User","site_admin":false},"body":"1. Обмен данными между сервером и клиентом происходит через xml файлы\r\n\r\n- Клиент подключается к серверу и отправляет xml с логином и паролем\r\n(<user><signup><login>abcd</login><password>12345</password></signup></user>)\r\n\r\n- Клиент отправляет на сервер команду о желании начать партию\r\n(<user><start>1</start></user>)\r\n\r\n-Клиент получает данные: победа, количество побед в раунде,  его ли очередь хода, карты в руке, карты на поле, количество карт в руке соперника\r\n\r\n2. Об игре\r\n- Игра длиться 2 или 3 раунда в зависимости от того кто победит в 1 и 2 раунде. В игре побеждает тот кто быстрее наберет 2 победы в раундах.  3ий раунд играется, если через 2 раунда ничья.\r\n- В раунде побеждает тот кто наберет больше всего очков.\r\n- Очки складываются из силы карт лежащих на поле \r\n- Раунд завершается когда пасанут оба игрока.\r\n-После того как пасанет один игрок, другой может продолжать кидать карты пока он сам не пасанет.\r\n-За ход можно сыграть одну карту из руки (не считая карт со способностями, которые могут вытягивать на поле другие карты)\r\n-В каждом раунде поле обновляется(не считая карт со специальных карт со способностями)\r\n-Колода одна на всю игру\r\n-Карты в руке и колода при перехода от раунда к раунду не изменяются \r\n\r\n3. Карты(будет дополняться, тестовая версия)\r\nЕсть три типа карт:\r\n-Сущность (обладает силой)\r\nСкорее всего от сущности будет зависеть её сила\r\n-Сущность со способностью(обладает силой и способностью)\r\n-Способность (Какие-нибудь карты погоды или что-нибудь подобное)\r\n3.1. buff Удваивает свою силу и силу карты на поле с соответствующей сущностью (Для сущности со способностью)\r\n3.2. spy карта кладется на стол противника, но в руку получаете +2 карты (Для сущности со способностью)\r\n3.3 rollcall вытягивает подобную сущность из колоды вместе с собой на поле (Для сущности со способностью)\r\n\r\nВоспользовался паттерном Factory Method. Но генерация карт пока не продуманная. Планирую вынести генерацию карт в отдельный класс. Пока что все в юзере.\r\nПеренес генерацию xml(qdomelement) в сами классы.","created_at":"2018-05-16T17:10:50Z","updated_at":"2018-06-17T09:18:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6642a29cb1c5cbc687f39bfbbc55d6e8236831ec","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":899716177,"node_id":"MDU6TGFiZWw4OTk3MTYxNzc=","url":"https://api.github.com/repos/lostmap/CardGame/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/lostmap/CardGame/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lostmap/CardGame/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lostmap/CardGame/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lostmap/CardGame/issues/1/comments","statuses_url":"https://api.github.com/repos/lostmap/CardGame/statuses/99439f5c82c2f7fc4d7d05f6d1e4645a6daf1eb3","head":{"label":"lostmap:dlipko","ref":"dlipko","sha":"99439f5c82c2f7fc4d7d05f6d1e4645a6daf1eb3","user":{"login":"lostmap","id":24614195,"node_id":"MDQ6VXNlcjI0NjE0MTk1","avatar_url":"https://avatars3.githubusercontent.com/u/24614195?v=4","gravatar_id":"","url":"https://api.github.com/users/lostmap","html_url":"https://github.com/lostmap","followers_url":"https://api.github.com/users/lostmap/followers","following_url":"https://api.github.com/users/lostmap/following{/other_user}","gists_url":"https://api.github.com/users/lostmap/gists{/gist_id}","starred_url":"https://api.github.com/users/lostmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostmap/subscriptions","organizations_url":"https://api.github.com/users/lostmap/orgs","repos_url":"https://api.github.com/users/lostmap/repos","events_url":"https://api.github.com/users/lostmap/events{/privacy}","received_events_url":"https://api.github.com/users/lostmap/received_events","type":"User","site_admin":false},"repo":{"id":129280087,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkyODAwODc=","name":"CardGame","full_name":"lostmap/CardGame","owner":{"login":"lostmap","id":24614195,"node_id":"MDQ6VXNlcjI0NjE0MTk1","avatar_url":"https://avatars3.githubusercontent.com/u/24614195?v=4","gravatar_id":"","url":"https://api.github.com/users/lostmap","html_url":"https://github.com/lostmap","followers_url":"https://api.github.com/users/lostmap/followers","following_url":"https://api.github.com/users/lostmap/following{/other_user}","gists_url":"https://api.github.com/users/lostmap/gists{/gist_id}","starred_url":"https://api.github.com/users/lostmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostmap/subscriptions","organizations_url":"https://api.github.com/users/lostmap/orgs","repos_url":"https://api.github.com/users/lostmap/repos","events_url":"https://api.github.com/users/lostmap/events{/privacy}","received_events_url":"https://api.github.com/users/lostmap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lostmap/CardGame","description":null,"fork":false,"url":"https://api.github.com/repos/lostmap/CardGame","forks_url":"https://api.github.com/repos/lostmap/CardGame/forks","keys_url":"https://api.github.com/repos/lostmap/CardGame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lostmap/CardGame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lostmap/CardGame/teams","hooks_url":"https://api.github.com/repos/lostmap/CardGame/hooks","issue_events_url":"https://api.github.com/repos/lostmap/CardGame/issues/events{/number}","events_url":"https://api.github.com/repos/lostmap/CardGame/events","assignees_url":"https://api.github.com/repos/lostmap/CardGame/assignees{/user}","branches_url":"https://api.github.com/repos/lostmap/CardGame/branches{/branch}","tags_url":"https://api.github.com/repos/lostmap/CardGame/tags","blobs_url":"https://api.github.com/repos/lostmap/CardGame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lostmap/CardGame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lostmap/CardGame/git/refs{/sha}","trees_url":"https://api.github.com/repos/lostmap/CardGame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lostmap/CardGame/statuses/{sha}","languages_url":"https://api.github.com/repos/lostmap/CardGame/languages","stargazers_url":"https://api.github.com/repos/lostmap/CardGame/stargazers","contributors_url":"https://api.github.com/repos/lostmap/CardGame/contributors","subscribers_url":"https://api.github.com/repos/lostmap/CardGame/subscribers","subscription_url":"https://api.github.com/repos/lostmap/CardGame/subscription","commits_url":"https://api.github.com/repos/lostmap/CardGame/commits{/sha}","git_commits_url":"https://api.github.com/repos/lostmap/CardGame/git/commits{/sha}","comments_url":"https://api.github.com/repos/lostmap/CardGame/comments{/number}","issue_comment_url":"https://api.github.com/repos/lostmap/CardGame/issues/comments{/number}","contents_url":"https://api.github.com/repos/lostmap/CardGame/contents/{+path}","compare_url":"https://api.github.com/repos/lostmap/CardGame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lostmap/CardGame/merges","archive_url":"https://api.github.com/repos/lostmap/CardGame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lostmap/CardGame/downloads","issues_url":"https://api.github.com/repos/lostmap/CardGame/issues{/number}","pulls_url":"https://api.github.com/repos/lostmap/CardGame/pulls{/number}","milestones_url":"https://api.github.com/repos/lostmap/CardGame/milestones{/number}","notifications_url":"https://api.github.com/repos/lostmap/CardGame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lostmap/CardGame/labels{/name}","releases_url":"https://api.github.com/repos/lostmap/CardGame/releases{/id}","deployments_url":"https://api.github.com/repos/lostmap/CardGame/deployments","created_at":"2018-04-12T16:23:37Z","updated_at":"2018-06-16T08:13:54Z","pushed_at":"2018-06-17T09:15:00Z","git_url":"git://github.com/lostmap/CardGame.git","ssh_url":"git@github.com:lostmap/CardGame.git","clone_url":"https://github.com/lostmap/CardGame.git","svn_url":"https://github.com/lostmap/CardGame","homepage":null,"size":147,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"lostmap:master","ref":"master","sha":"87569cb25d9e705f37ac736733fd4656d046c150","user":{"login":"lostmap","id":24614195,"node_id":"MDQ6VXNlcjI0NjE0MTk1","avatar_url":"https://avatars3.githubusercontent.com/u/24614195?v=4","gravatar_id":"","url":"https://api.github.com/users/lostmap","html_url":"https://github.com/lostmap","followers_url":"https://api.github.com/users/lostmap/followers","following_url":"https://api.github.com/users/lostmap/following{/other_user}","gists_url":"https://api.github.com/users/lostmap/gists{/gist_id}","starred_url":"https://api.github.com/users/lostmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostmap/subscriptions","organizations_url":"https://api.github.com/users/lostmap/orgs","repos_url":"https://api.github.com/users/lostmap/repos","events_url":"https://api.github.com/users/lostmap/events{/privacy}","received_events_url":"https://api.github.com/users/lostmap/received_events","type":"User","site_admin":false},"repo":{"id":129280087,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkyODAwODc=","name":"CardGame","full_name":"lostmap/CardGame","owner":{"login":"lostmap","id":24614195,"node_id":"MDQ6VXNlcjI0NjE0MTk1","avatar_url":"https://avatars3.githubusercontent.com/u/24614195?v=4","gravatar_id":"","url":"https://api.github.com/users/lostmap","html_url":"https://github.com/lostmap","followers_url":"https://api.github.com/users/lostmap/followers","following_url":"https://api.github.com/users/lostmap/following{/other_user}","gists_url":"https://api.github.com/users/lostmap/gists{/gist_id}","starred_url":"https://api.github.com/users/lostmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostmap/subscriptions","organizations_url":"https://api.github.com/users/lostmap/orgs","repos_url":"https://api.github.com/users/lostmap/repos","events_url":"https://api.github.com/users/lostmap/events{/privacy}","received_events_url":"https://api.github.com/users/lostmap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lostmap/CardGame","description":null,"fork":false,"url":"https://api.github.com/repos/lostmap/CardGame","forks_url":"https://api.github.com/repos/lostmap/CardGame/forks","keys_url":"https://api.github.com/repos/lostmap/CardGame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lostmap/CardGame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lostmap/CardGame/teams","hooks_url":"https://api.github.com/repos/lostmap/CardGame/hooks","issue_events_url":"https://api.github.com/repos/lostmap/CardGame/issues/events{/number}","events_url":"https://api.github.com/repos/lostmap/CardGame/events","assignees_url":"https://api.github.com/repos/lostmap/CardGame/assignees{/user}","branches_url":"https://api.github.com/repos/lostmap/CardGame/branches{/branch}","tags_url":"https://api.github.com/repos/lostmap/CardGame/tags","blobs_url":"https://api.github.com/repos/lostmap/CardGame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lostmap/CardGame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lostmap/CardGame/git/refs{/sha}","trees_url":"https://api.github.com/repos/lostmap/CardGame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lostmap/CardGame/statuses/{sha}","languages_url":"https://api.github.com/repos/lostmap/CardGame/languages","stargazers_url":"https://api.github.com/repos/lostmap/CardGame/stargazers","contributors_url":"https://api.github.com/repos/lostmap/CardGame/contributors","subscribers_url":"https://api.github.com/repos/lostmap/CardGame/subscribers","subscription_url":"https://api.github.com/repos/lostmap/CardGame/subscription","commits_url":"https://api.github.com/repos/lostmap/CardGame/commits{/sha}","git_commits_url":"https://api.github.com/repos/lostmap/CardGame/git/commits{/sha}","comments_url":"https://api.github.com/repos/lostmap/CardGame/comments{/number}","issue_comment_url":"https://api.github.com/repos/lostmap/CardGame/issues/comments{/number}","contents_url":"https://api.github.com/repos/lostmap/CardGame/contents/{+path}","compare_url":"https://api.github.com/repos/lostmap/CardGame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lostmap/CardGame/merges","archive_url":"https://api.github.com/repos/lostmap/CardGame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lostmap/CardGame/downloads","issues_url":"https://api.github.com/repos/lostmap/CardGame/issues{/number}","pulls_url":"https://api.github.com/repos/lostmap/CardGame/pulls{/number}","milestones_url":"https://api.github.com/repos/lostmap/CardGame/milestones{/number}","notifications_url":"https://api.github.com/repos/lostmap/CardGame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lostmap/CardGame/labels{/name}","releases_url":"https://api.github.com/repos/lostmap/CardGame/releases{/id}","deployments_url":"https://api.github.com/repos/lostmap/CardGame/deployments","created_at":"2018-04-12T16:23:37Z","updated_at":"2018-06-16T08:13:54Z","pushed_at":"2018-06-17T09:15:00Z","git_url":"git://github.com/lostmap/CardGame.git","ssh_url":"git@github.com:lostmap/CardGame.git","clone_url":"https://github.com/lostmap/CardGame.git","svn_url":"https://github.com/lostmap/CardGame","homepage":null,"size":147,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lostmap/CardGame/pulls/1"},"html":{"href":"https://github.com/lostmap/CardGame/pull/1"},"issue":{"href":"https://api.github.com/repos/lostmap/CardGame/issues/1"},"comments":{"href":"https://api.github.com/repos/lostmap/CardGame/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lostmap/CardGame/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lostmap/CardGame/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lostmap/CardGame/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lostmap/CardGame/statuses/99439f5c82c2f7fc4d7d05f6d1e4645a6daf1eb3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dlipko"}}