{"action":"opened","number":1375,"pull_request":{"url":"https://api.github.com/repos/teeworlds/teeworlds/pulls/1375","id":39425848,"html_url":"https://github.com/teeworlds/teeworlds/pull/1375","diff_url":"https://github.com/teeworlds/teeworlds/pull/1375.diff","patch_url":"https://github.com/teeworlds/teeworlds/pull/1375.patch","issue_url":"https://api.github.com/repos/teeworlds/teeworlds/issues/1375","number":1375,"state":"open","locked":false,"title":"Game server code refactor","user":{"login":"Choupom","id":294259,"avatar_url":"https://avatars.githubusercontent.com/u/294259?v=3","gravatar_id":"","url":"https://api.github.com/users/Choupom","html_url":"https://github.com/Choupom","followers_url":"https://api.github.com/users/Choupom/followers","following_url":"https://api.github.com/users/Choupom/following{/other_user}","gists_url":"https://api.github.com/users/Choupom/gists{/gist_id}","starred_url":"https://api.github.com/users/Choupom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Choupom/subscriptions","organizations_url":"https://api.github.com/users/Choupom/orgs","repos_url":"https://api.github.com/users/Choupom/repos","events_url":"https://api.github.com/users/Choupom/events{/privacy}","received_events_url":"https://api.github.com/users/Choupom/received_events","type":"User","site_admin":false},"body":"Each commit refactors a specific class, though some commits are some unrelated bug fixes i came across randomly.\r\n\r\nIt's a refactoring of every class/source file of the `game/server/` part of the code.\r\nExcept `CGameContext`, `CGameController` and `CPlayer` which are in a fairly hopeless state :(\r\n\r\nThis refactoring includes:\r\n- a less flat architecture with more subclasses instead of switch-cases everywhere (f.e. pickup types, projectile types, weapons)\r\n- more readability (especially thanks to having multiple simple classes with a specific role)\r\n- more documentation (especially in the header files), self-explanatory variable/function names\r\n- more genericity, easier to expand than before (f.e. gameworld, entities)\r\n- more consistency\r\n\r\nThe game play is intended to remain unchanged (besides the intentional bug fixes).\r\nHowever it does change the game protocol slightly (projectiles and pickup enums afair).\r\n\r\nSince the diff is pretty messy i advise to look at the header files or at the new subclasses (pickups/projectiles/weapons).\r\n\r\nWould preferably be pulled ASAP so that it can be tested more thoroughly... and because it will conflict with\r\nevery other modificiation in the game server code.\r\nAtm i think there should be no conflict with the 0.7 branch nor the unmerged 0.6 commits.\r\n","created_at":"2015-07-07T22:56:20Z","updated_at":"2015-07-07T22:56:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/teeworlds/teeworlds/pulls/1375/commits","review_comments_url":"https://api.github.com/repos/teeworlds/teeworlds/pulls/1375/comments","review_comment_url":"https://api.github.com/repos/teeworlds/teeworlds/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teeworlds/teeworlds/issues/1375/comments","statuses_url":"https://api.github.com/repos/teeworlds/teeworlds/statuses/09bbf28b2d5202811e611f7baffb8b565fa1350e","head":{"label":"Choupom:refactor","ref":"refactor","sha":"09bbf28b2d5202811e611f7baffb8b565fa1350e","user":{"login":"Choupom","id":294259,"avatar_url":"https://avatars.githubusercontent.com/u/294259?v=3","gravatar_id":"","url":"https://api.github.com/users/Choupom","html_url":"https://github.com/Choupom","followers_url":"https://api.github.com/users/Choupom/followers","following_url":"https://api.github.com/users/Choupom/following{/other_user}","gists_url":"https://api.github.com/users/Choupom/gists{/gist_id}","starred_url":"https://api.github.com/users/Choupom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Choupom/subscriptions","organizations_url":"https://api.github.com/users/Choupom/orgs","repos_url":"https://api.github.com/users/Choupom/repos","events_url":"https://api.github.com/users/Choupom/events{/privacy}","received_events_url":"https://api.github.com/users/Choupom/received_events","type":"User","site_admin":false},"repo":{"id":915582,"name":"teeworlds","full_name":"Choupom/teeworlds","owner":{"login":"Choupom","id":294259,"avatar_url":"https://avatars.githubusercontent.com/u/294259?v=3","gravatar_id":"","url":"https://api.github.com/users/Choupom","html_url":"https://github.com/Choupom","followers_url":"https://api.github.com/users/Choupom/followers","following_url":"https://api.github.com/users/Choupom/following{/other_user}","gists_url":"https://api.github.com/users/Choupom/gists{/gist_id}","starred_url":"https://api.github.com/users/Choupom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Choupom/subscriptions","organizations_url":"https://api.github.com/users/Choupom/orgs","repos_url":"https://api.github.com/users/Choupom/repos","events_url":"https://api.github.com/users/Choupom/events{/privacy}","received_events_url":"https://api.github.com/users/Choupom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Choupom/teeworlds","description":"A retro multiplayer shooter","fork":true,"url":"https://api.github.com/repos/Choupom/teeworlds","forks_url":"https://api.github.com/repos/Choupom/teeworlds/forks","keys_url":"https://api.github.com/repos/Choupom/teeworlds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Choupom/teeworlds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Choupom/teeworlds/teams","hooks_url":"https://api.github.com/repos/Choupom/teeworlds/hooks","issue_events_url":"https://api.github.com/repos/Choupom/teeworlds/issues/events{/number}","events_url":"https://api.github.com/repos/Choupom/teeworlds/events","assignees_url":"https://api.github.com/repos/Choupom/teeworlds/assignees{/user}","branches_url":"https://api.github.com/repos/Choupom/teeworlds/branches{/branch}","tags_url":"https://api.github.com/repos/Choupom/teeworlds/tags","blobs_url":"https://api.github.com/repos/Choupom/teeworlds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Choupom/teeworlds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Choupom/teeworlds/git/refs{/sha}","trees_url":"https://api.github.com/repos/Choupom/teeworlds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Choupom/teeworlds/statuses/{sha}","languages_url":"https://api.github.com/repos/Choupom/teeworlds/languages","stargazers_url":"https://api.github.com/repos/Choupom/teeworlds/stargazers","contributors_url":"https://api.github.com/repos/Choupom/teeworlds/contributors","subscribers_url":"https://api.github.com/repos/Choupom/teeworlds/subscribers","subscription_url":"https://api.github.com/repos/Choupom/teeworlds/subscription","commits_url":"https://api.github.com/repos/Choupom/teeworlds/commits{/sha}","git_commits_url":"https://api.github.com/repos/Choupom/teeworlds/git/commits{/sha}","comments_url":"https://api.github.com/repos/Choupom/teeworlds/comments{/number}","issue_comment_url":"https://api.github.com/repos/Choupom/teeworlds/issues/comments{/number}","contents_url":"https://api.github.com/repos/Choupom/teeworlds/contents/{+path}","compare_url":"https://api.github.com/repos/Choupom/teeworlds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Choupom/teeworlds/merges","archive_url":"https://api.github.com/repos/Choupom/teeworlds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Choupom/teeworlds/downloads","issues_url":"https://api.github.com/repos/Choupom/teeworlds/issues{/number}","pulls_url":"https://api.github.com/repos/Choupom/teeworlds/pulls{/number}","milestones_url":"https://api.github.com/repos/Choupom/teeworlds/milestones{/number}","notifications_url":"https://api.github.com/repos/Choupom/teeworlds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Choupom/teeworlds/labels{/name}","releases_url":"https://api.github.com/repos/Choupom/teeworlds/releases{/id}","created_at":"2010-09-16T14:08:44Z","updated_at":"2015-07-07T22:52:01Z","pushed_at":"2015-07-07T22:52:00Z","git_url":"git://github.com/Choupom/teeworlds.git","ssh_url":"git@github.com:Choupom/teeworlds.git","clone_url":"https://github.com/Choupom/teeworlds.git","svn_url":"https://github.com/Choupom/teeworlds","homepage":"http://teeworlds.com","size":70449,"stargazers_count":5,"watchers_count":5,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":5,"default_branch":"refactor"}},"base":{"label":"teeworlds:master","ref":"master","sha":"e592d1b1fa8aaf6a5c559537ba047d47553cf9ef","user":{"login":"teeworlds","id":705559,"avatar_url":"https://avatars.githubusercontent.com/u/705559?v=3","gravatar_id":"","url":"https://api.github.com/users/teeworlds","html_url":"https://github.com/teeworlds","followers_url":"https://api.github.com/users/teeworlds/followers","following_url":"https://api.github.com/users/teeworlds/following{/other_user}","gists_url":"https://api.github.com/users/teeworlds/gists{/gist_id}","starred_url":"https://api.github.com/users/teeworlds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teeworlds/subscriptions","organizations_url":"https://api.github.com/users/teeworlds/orgs","repos_url":"https://api.github.com/users/teeworlds/repos","events_url":"https://api.github.com/users/teeworlds/events{/privacy}","received_events_url":"https://api.github.com/users/teeworlds/received_events","type":"Organization","site_admin":false},"repo":{"id":699072,"name":"teeworlds","full_name":"teeworlds/teeworlds","owner":{"login":"teeworlds","id":705559,"avatar_url":"https://avatars.githubusercontent.com/u/705559?v=3","gravatar_id":"","url":"https://api.github.com/users/teeworlds","html_url":"https://github.com/teeworlds","followers_url":"https://api.github.com/users/teeworlds/followers","following_url":"https://api.github.com/users/teeworlds/following{/other_user}","gists_url":"https://api.github.com/users/teeworlds/gists{/gist_id}","starred_url":"https://api.github.com/users/teeworlds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teeworlds/subscriptions","organizations_url":"https://api.github.com/users/teeworlds/orgs","repos_url":"https://api.github.com/users/teeworlds/repos","events_url":"https://api.github.com/users/teeworlds/events{/privacy}","received_events_url":"https://api.github.com/users/teeworlds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teeworlds/teeworlds","description":"A retro multiplayer shooter","fork":true,"url":"https://api.github.com/repos/teeworlds/teeworlds","forks_url":"https://api.github.com/repos/teeworlds/teeworlds/forks","keys_url":"https://api.github.com/repos/teeworlds/teeworlds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teeworlds/teeworlds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teeworlds/teeworlds/teams","hooks_url":"https://api.github.com/repos/teeworlds/teeworlds/hooks","issue_events_url":"https://api.github.com/repos/teeworlds/teeworlds/issues/events{/number}","events_url":"https://api.github.com/repos/teeworlds/teeworlds/events","assignees_url":"https://api.github.com/repos/teeworlds/teeworlds/assignees{/user}","branches_url":"https://api.github.com/repos/teeworlds/teeworlds/branches{/branch}","tags_url":"https://api.github.com/repos/teeworlds/teeworlds/tags","blobs_url":"https://api.github.com/repos/teeworlds/teeworlds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teeworlds/teeworlds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teeworlds/teeworlds/git/refs{/sha}","trees_url":"https://api.github.com/repos/teeworlds/teeworlds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teeworlds/teeworlds/statuses/{sha}","languages_url":"https://api.github.com/repos/teeworlds/teeworlds/languages","stargazers_url":"https://api.github.com/repos/teeworlds/teeworlds/stargazers","contributors_url":"https://api.github.com/repos/teeworlds/teeworlds/contributors","subscribers_url":"https://api.github.com/repos/teeworlds/teeworlds/subscribers","subscription_url":"https://api.github.com/repos/teeworlds/teeworlds/subscription","commits_url":"https://api.github.com/repos/teeworlds/teeworlds/commits{/sha}","git_commits_url":"https://api.github.com/repos/teeworlds/teeworlds/git/commits{/sha}","comments_url":"https://api.github.com/repos/teeworlds/teeworlds/comments{/number}","issue_comment_url":"https://api.github.com/repos/teeworlds/teeworlds/issues/comments{/number}","contents_url":"https://api.github.com/repos/teeworlds/teeworlds/contents/{+path}","compare_url":"https://api.github.com/repos/teeworlds/teeworlds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teeworlds/teeworlds/merges","archive_url":"https://api.github.com/repos/teeworlds/teeworlds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teeworlds/teeworlds/downloads","issues_url":"https://api.github.com/repos/teeworlds/teeworlds/issues{/number}","pulls_url":"https://api.github.com/repos/teeworlds/teeworlds/pulls{/number}","milestones_url":"https://api.github.com/repos/teeworlds/teeworlds/milestones{/number}","notifications_url":"https://api.github.com/repos/teeworlds/teeworlds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teeworlds/teeworlds/labels{/name}","releases_url":"https://api.github.com/repos/teeworlds/teeworlds/releases{/id}","created_at":"2010-06-02T12:17:21Z","updated_at":"2015-07-06T13:08:52Z","pushed_at":"2015-07-05T11:15:23Z","git_url":"git://github.com/teeworlds/teeworlds.git","ssh_url":"git@github.com:teeworlds/teeworlds.git","clone_url":"https://github.com/teeworlds/teeworlds.git","svn_url":"https://github.com/teeworlds/teeworlds","homepage":"http://teeworlds.com","size":120523,"stargazers_count":428,"watchers_count":428,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":200,"mirror_url":null,"open_issues_count":184,"forks":200,"open_issues":184,"watchers":428,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teeworlds/teeworlds/pulls/1375"},"html":{"href":"https://github.com/teeworlds/teeworlds/pull/1375"},"issue":{"href":"https://api.github.com/repos/teeworlds/teeworlds/issues/1375"},"comments":{"href":"https://api.github.com/repos/teeworlds/teeworlds/issues/1375/comments"},"review_comments":{"href":"https://api.github.com/repos/teeworlds/teeworlds/pulls/1375/comments"},"review_comment":{"href":"https://api.github.com/repos/teeworlds/teeworlds/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teeworlds/teeworlds/pulls/1375/commits"},"statuses":{"href":"https://api.github.com/repos/teeworlds/teeworlds/statuses/09bbf28b2d5202811e611f7baffb8b565fa1350e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":15,"additions":2417,"deletions":1388,"changed_files":69}}