{"action":"created","comment":{"url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/comments/222156179","pull_request_review_id":160976905,"id":222156179,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjE1NjE3OQ==","diff_hunk":"@@ -0,0 +1,42 @@\n+from flask import Flask, request\n+from structs import Point\n+from bot import Bot\n+from player import Player\n+from gamemap import GameMap\n+import json\n+\n+app = Flask(__name__)\n+\n+bot = Bot()\n+\n+\n+def deserialize(data):\n+    if \"x\" in data and \"y\" in data:\n+        return Point(data[\"x\"], data[\"y\"])\n+    elif \"Name\" in data:\n+        return Player(data[\"Health\"], data[\"MaxHealth\"], data[\"CarriedResources\"],\n+                      data[\"CarryingCapacity\"], data[\"CollectingSpeed\"], data[\"TotalResources\"],\n+                      data[\"AttackPower\"], data[\"Defence\"], data[\"Position\"],\n+                      data[\"HouseLocation\"], data[\"CarriedItems\"], data[\"Score\"], data[\"Name\"],\n+                      data[\"UpgradeLevels\"])\n+    elif \"CustomSerializedMap\" in data:\n+        data[\"GameMap\"] = GameMap(\n+            data[\"CustomSerializedMap\"], data[\"xMin\"], data[\"yMin\"])\n+    return data\n+\n+\n+@app.route(\"/\", methods=[\"POST\"])\n+def reponse():\n+    \"\"\"\n+    Point d'entree appelle par le GameServer\n+    \"\"\"\n+    gameInfo = json.loads(request.form[\"data\"], object_hook=deserialize)\n+    player = gameInfo[\"Player\"]\n+    bot.before_turn(player)\n+    action = bot.execute_turn(gameInfo['GameMap'], gameInfo['OtherPlayers'])","path":"server.py","position":36,"original_position":36,"commit_id":"f0ce3c1c86a2a3f58d7c63607aeb0c04d3927ac2","original_commit_id":"f0ce3c1c86a2a3f58d7c63607aeb0c04d3927ac2","user":{"login":"frankilepro","id":17006203,"node_id":"MDQ6VXNlcjE3MDA2MjAz","avatar_url":"https://avatars2.githubusercontent.com/u/17006203?v=4","gravatar_id":"","url":"https://api.github.com/users/frankilepro","html_url":"https://github.com/frankilepro","followers_url":"https://api.github.com/users/frankilepro/followers","following_url":"https://api.github.com/users/frankilepro/following{/other_user}","gists_url":"https://api.github.com/users/frankilepro/gists{/gist_id}","starred_url":"https://api.github.com/users/frankilepro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankilepro/subscriptions","organizations_url":"https://api.github.com/users/frankilepro/orgs","repos_url":"https://api.github.com/users/frankilepro/repos","events_url":"https://api.github.com/users/frankilepro/events{/privacy}","received_events_url":"https://api.github.com/users/frankilepro/received_events","type":"User","site_admin":false},"body":"Non mais fait juste me dire cetait quoi ton idee a la base ahah?","created_at":"2018-10-03T01:01:03Z","updated_at":"2018-10-03T01:01:03Z","html_url":"https://github.com/LHGames-2017/Python-seed/pull/1#discussion_r222156179","pull_request_url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/comments/222156179"},"html":{"href":"https://github.com/LHGames-2017/Python-seed/pull/1#discussion_r222156179"},"pull_request":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1"}},"in_reply_to_id":222155709},"pull_request":{"url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1","id":219783510,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzgzNTEw","html_url":"https://github.com/LHGames-2017/Python-seed/pull/1","diff_url":"https://github.com/LHGames-2017/Python-seed/pull/1.diff","patch_url":"https://github.com/LHGames-2017/Python-seed/pull/1.patch","issue_url":"https://api.github.com/repos/LHGames-2017/Python-seed/issues/1","number":1,"state":"open","locked":false,"title":"Implement python client for 2018","user":{"login":"Mathos1432","id":5472443,"node_id":"MDQ6VXNlcjU0NzI0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/5472443?v=4","gravatar_id":"","url":"https://api.github.com/users/Mathos1432","html_url":"https://github.com/Mathos1432","followers_url":"https://api.github.com/users/Mathos1432/followers","following_url":"https://api.github.com/users/Mathos1432/following{/other_user}","gists_url":"https://api.github.com/users/Mathos1432/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathos1432/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathos1432/subscriptions","organizations_url":"https://api.github.com/users/Mathos1432/orgs","repos_url":"https://api.github.com/users/Mathos1432/repos","events_url":"https://api.github.com/users/Mathos1432/events{/privacy}","received_events_url":"https://api.github.com/users/Mathos1432/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-02T17:26:10Z","updated_at":"2018-10-03T01:01:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b591b8538b3c1e34ee4dc3d414a08f032a83dea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1/commits","review_comments_url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1/comments","review_comment_url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LHGames-2017/Python-seed/issues/1/comments","statuses_url":"https://api.github.com/repos/LHGames-2017/Python-seed/statuses/f0ce3c1c86a2a3f58d7c63607aeb0c04d3927ac2","head":{"label":"Mathos1432:master","ref":"master","sha":"f0ce3c1c86a2a3f58d7c63607aeb0c04d3927ac2","user":{"login":"Mathos1432","id":5472443,"node_id":"MDQ6VXNlcjU0NzI0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/5472443?v=4","gravatar_id":"","url":"https://api.github.com/users/Mathos1432","html_url":"https://github.com/Mathos1432","followers_url":"https://api.github.com/users/Mathos1432/followers","following_url":"https://api.github.com/users/Mathos1432/following{/other_user}","gists_url":"https://api.github.com/users/Mathos1432/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathos1432/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathos1432/subscriptions","organizations_url":"https://api.github.com/users/Mathos1432/orgs","repos_url":"https://api.github.com/users/Mathos1432/repos","events_url":"https://api.github.com/users/Mathos1432/events{/privacy}","received_events_url":"https://api.github.com/users/Mathos1432/received_events","type":"User","site_admin":false},"repo":{"id":150642809,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA2NDI4MDk=","name":"Python-seed","full_name":"Mathos1432/Python-seed","private":false,"owner":{"login":"Mathos1432","id":5472443,"node_id":"MDQ6VXNlcjU0NzI0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/5472443?v=4","gravatar_id":"","url":"https://api.github.com/users/Mathos1432","html_url":"https://github.com/Mathos1432","followers_url":"https://api.github.com/users/Mathos1432/followers","following_url":"https://api.github.com/users/Mathos1432/following{/other_user}","gists_url":"https://api.github.com/users/Mathos1432/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathos1432/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathos1432/subscriptions","organizations_url":"https://api.github.com/users/Mathos1432/orgs","repos_url":"https://api.github.com/users/Mathos1432/repos","events_url":"https://api.github.com/users/Mathos1432/events{/privacy}","received_events_url":"https://api.github.com/users/Mathos1432/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Mathos1432/Python-seed","description":null,"fork":true,"url":"https://api.github.com/repos/Mathos1432/Python-seed","forks_url":"https://api.github.com/repos/Mathos1432/Python-seed/forks","keys_url":"https://api.github.com/repos/Mathos1432/Python-seed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mathos1432/Python-seed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mathos1432/Python-seed/teams","hooks_url":"https://api.github.com/repos/Mathos1432/Python-seed/hooks","issue_events_url":"https://api.github.com/repos/Mathos1432/Python-seed/issues/events{/number}","events_url":"https://api.github.com/repos/Mathos1432/Python-seed/events","assignees_url":"https://api.github.com/repos/Mathos1432/Python-seed/assignees{/user}","branches_url":"https://api.github.com/repos/Mathos1432/Python-seed/branches{/branch}","tags_url":"https://api.github.com/repos/Mathos1432/Python-seed/tags","blobs_url":"https://api.github.com/repos/Mathos1432/Python-seed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mathos1432/Python-seed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mathos1432/Python-seed/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mathos1432/Python-seed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mathos1432/Python-seed/statuses/{sha}","languages_url":"https://api.github.com/repos/Mathos1432/Python-seed/languages","stargazers_url":"https://api.github.com/repos/Mathos1432/Python-seed/stargazers","contributors_url":"https://api.github.com/repos/Mathos1432/Python-seed/contributors","subscribers_url":"https://api.github.com/repos/Mathos1432/Python-seed/subscribers","subscription_url":"https://api.github.com/repos/Mathos1432/Python-seed/subscription","commits_url":"https://api.github.com/repos/Mathos1432/Python-seed/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mathos1432/Python-seed/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mathos1432/Python-seed/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mathos1432/Python-seed/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mathos1432/Python-seed/contents/{+path}","compare_url":"https://api.github.com/repos/Mathos1432/Python-seed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mathos1432/Python-seed/merges","archive_url":"https://api.github.com/repos/Mathos1432/Python-seed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mathos1432/Python-seed/downloads","issues_url":"https://api.github.com/repos/Mathos1432/Python-seed/issues{/number}","pulls_url":"https://api.github.com/repos/Mathos1432/Python-seed/pulls{/number}","milestones_url":"https://api.github.com/repos/Mathos1432/Python-seed/milestones{/number}","notifications_url":"https://api.github.com/repos/Mathos1432/Python-seed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mathos1432/Python-seed/labels{/name}","releases_url":"https://api.github.com/repos/Mathos1432/Python-seed/releases{/id}","deployments_url":"https://api.github.com/repos/Mathos1432/Python-seed/deployments","created_at":"2018-09-27T20:16:59Z","updated_at":"2018-09-28T04:20:02Z","pushed_at":"2018-09-28T04:20:01Z","git_url":"git://github.com/Mathos1432/Python-seed.git","ssh_url":"git@github.com:Mathos1432/Python-seed.git","clone_url":"https://github.com/Mathos1432/Python-seed.git","svn_url":"https://github.com/Mathos1432/Python-seed","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"LHGames-2017:master","ref":"master","sha":"b9d32349879d7a5b1ae0f140251135ae6c0b1e65","user":{"login":"LHGames-2017","id":32224392,"node_id":"MDQ6VXNlcjMyMjI0Mzky","avatar_url":"https://avatars1.githubusercontent.com/u/32224392?v=4","gravatar_id":"","url":"https://api.github.com/users/LHGames-2017","html_url":"https://github.com/LHGames-2017","followers_url":"https://api.github.com/users/LHGames-2017/followers","following_url":"https://api.github.com/users/LHGames-2017/following{/other_user}","gists_url":"https://api.github.com/users/LHGames-2017/gists{/gist_id}","starred_url":"https://api.github.com/users/LHGames-2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LHGames-2017/subscriptions","organizations_url":"https://api.github.com/users/LHGames-2017/orgs","repos_url":"https://api.github.com/users/LHGames-2017/repos","events_url":"https://api.github.com/users/LHGames-2017/events{/privacy}","received_events_url":"https://api.github.com/users/LHGames-2017/received_events","type":"User","site_admin":false},"repo":{"id":105592694,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU1OTI2OTQ=","name":"Python-seed","full_name":"LHGames-2017/Python-seed","private":false,"owner":{"login":"LHGames-2017","id":32224392,"node_id":"MDQ6VXNlcjMyMjI0Mzky","avatar_url":"https://avatars1.githubusercontent.com/u/32224392?v=4","gravatar_id":"","url":"https://api.github.com/users/LHGames-2017","html_url":"https://github.com/LHGames-2017","followers_url":"https://api.github.com/users/LHGames-2017/followers","following_url":"https://api.github.com/users/LHGames-2017/following{/other_user}","gists_url":"https://api.github.com/users/LHGames-2017/gists{/gist_id}","starred_url":"https://api.github.com/users/LHGames-2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LHGames-2017/subscriptions","organizations_url":"https://api.github.com/users/LHGames-2017/orgs","repos_url":"https://api.github.com/users/LHGames-2017/repos","events_url":"https://api.github.com/users/LHGames-2017/events{/privacy}","received_events_url":"https://api.github.com/users/LHGames-2017/received_events","type":"User","site_admin":false},"html_url":"https://github.com/LHGames-2017/Python-seed","description":null,"fork":false,"url":"https://api.github.com/repos/LHGames-2017/Python-seed","forks_url":"https://api.github.com/repos/LHGames-2017/Python-seed/forks","keys_url":"https://api.github.com/repos/LHGames-2017/Python-seed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LHGames-2017/Python-seed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LHGames-2017/Python-seed/teams","hooks_url":"https://api.github.com/repos/LHGames-2017/Python-seed/hooks","issue_events_url":"https://api.github.com/repos/LHGames-2017/Python-seed/issues/events{/number}","events_url":"https://api.github.com/repos/LHGames-2017/Python-seed/events","assignees_url":"https://api.github.com/repos/LHGames-2017/Python-seed/assignees{/user}","branches_url":"https://api.github.com/repos/LHGames-2017/Python-seed/branches{/branch}","tags_url":"https://api.github.com/repos/LHGames-2017/Python-seed/tags","blobs_url":"https://api.github.com/repos/LHGames-2017/Python-seed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LHGames-2017/Python-seed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LHGames-2017/Python-seed/git/refs{/sha}","trees_url":"https://api.github.com/repos/LHGames-2017/Python-seed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LHGames-2017/Python-seed/statuses/{sha}","languages_url":"https://api.github.com/repos/LHGames-2017/Python-seed/languages","stargazers_url":"https://api.github.com/repos/LHGames-2017/Python-seed/stargazers","contributors_url":"https://api.github.com/repos/LHGames-2017/Python-seed/contributors","subscribers_url":"https://api.github.com/repos/LHGames-2017/Python-seed/subscribers","subscription_url":"https://api.github.com/repos/LHGames-2017/Python-seed/subscription","commits_url":"https://api.github.com/repos/LHGames-2017/Python-seed/commits{/sha}","git_commits_url":"https://api.github.com/repos/LHGames-2017/Python-seed/git/commits{/sha}","comments_url":"https://api.github.com/repos/LHGames-2017/Python-seed/comments{/number}","issue_comment_url":"https://api.github.com/repos/LHGames-2017/Python-seed/issues/comments{/number}","contents_url":"https://api.github.com/repos/LHGames-2017/Python-seed/contents/{+path}","compare_url":"https://api.github.com/repos/LHGames-2017/Python-seed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LHGames-2017/Python-seed/merges","archive_url":"https://api.github.com/repos/LHGames-2017/Python-seed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LHGames-2017/Python-seed/downloads","issues_url":"https://api.github.com/repos/LHGames-2017/Python-seed/issues{/number}","pulls_url":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls{/number}","milestones_url":"https://api.github.com/repos/LHGames-2017/Python-seed/milestones{/number}","notifications_url":"https://api.github.com/repos/LHGames-2017/Python-seed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LHGames-2017/Python-seed/labels{/name}","releases_url":"https://api.github.com/repos/LHGames-2017/Python-seed/releases{/id}","deployments_url":"https://api.github.com/repos/LHGames-2017/Python-seed/deployments","created_at":"2017-10-02T22:44:28Z","updated_at":"2018-08-25T16:39:50Z","pushed_at":"2018-10-02T17:26:10Z","git_url":"git://github.com/LHGames-2017/Python-seed.git","ssh_url":"git@github.com:LHGames-2017/Python-seed.git","clone_url":"https://github.com/LHGames-2017/Python-seed.git","svn_url":"https://github.com/LHGames-2017/Python-seed","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1"},"html":{"href":"https://github.com/LHGames-2017/Python-seed/pull/1"},"issue":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/issues/1"},"comments":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/LHGames-2017/Python-seed/statuses/f0ce3c1c86a2a3f58d7c63607aeb0c04d3927ac2"}},"author_association":"NONE"}}
{"actor":{"display_login":"frankilepro"}}