{"action":"created","comment":{"url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/comments/48612479","id":48612479,"diff_hunk":"@@ -0,0 +1,142 @@\n+package org.systemexception.lunarlander.main;\n+\n+import org.jbox2d.common.Vec2;\n+import org.jbox2d.dynamics.Body;\n+import org.lwjgl.LWJGLException;\n+import org.lwjgl.opengl.Display;\n+import org.lwjgl.opengl.DisplayMode;\n+import org.lwjgl.opengl.GL11;\n+import org.newdawn.slick.Color;\n+import org.newdawn.slick.TrueTypeFont;\n+import org.newdawn.slick.opengl.TextureImpl;\n+import org.newdawn.slick.util.ResourceLoader;\n+import org.systemexception.lunarlander.constants.BodiesNames;\n+import org.systemexception.lunarlander.physics.GameEngine;\n+\n+import java.awt.*;\n+import java.io.InputStream;\n+\n+import static org.lwjgl.opengl.GL11.*;\n+\n+/**\n+ * @author leo\n+ * @date 29/12/15 14:22\n+ */\n+public class Main {\n+\n+\tprivate static final String WINDOW_TITLE = \"Physics in 2D!\";\n+\tprivate static final int[] WINDOW_DIMENSIONS = {800, 600};\n+\n+\tprivate final static double TWO_PI = 2 * Math.PI;\n+\n+\tprivate TrueTypeFont font;\n+\tprivate static GameEngine gameEngine;\n+\n+\tpublic static void main(String[] args) {\n+\n+\t\tMain main = new Main();\n+\t\tgameEngine = new GameEngine();\n+\t\tmain.start();\n+\t}\n+\n+\tprivate void start() {\n+\t\tinitGL();\n+\t\tinitFonts();\n+\t\tgameEngine.setUpObjects();\n+\n+\t\twhile (!Display.isCloseRequested()) {\n+\t\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT);\n+\t\t\trender();\n+\t\t\tgameEngine.input();\n+\t\t\tgameEngine.logic();\n+\n+\t\t\tDisplay.update();\n+\t\t\tDisplay.sync(60);\n+\t\t}\n+\t\tDisplay.destroy();\n+\t\tSystem.exit(0);\n+\t}\n+\n+\tprivate void initGL() {\n+\t\ttry {\n+\t\t\tDisplay.setDisplayMode(new DisplayMode(WINDOW_DIMENSIONS[0], WINDOW_DIMENSIONS[1]));\n+\t\t\tDisplay.setTitle(WINDOW_TITLE);\n+\t\t\tDisplay.setVSyncEnabled(true);\n+\t\t\tDisplay.create();\n+\t\t} catch (LWJGLException e) {\n+\t\t\te.printStackTrace();\n+\t\t\tSystem.exit(0);\n+\t\t}\n+\n+\t\tglMatrixMode(GL_PROJECTION);\n+\n+\t\tglShadeModel(GL11.GL_SMOOTH);\n+\t\tglDisable(GL11.GL_TEXTURE_2D);\n+\t\tglDisable(GL11.GL_DEPTH_TEST);\n+\t\tglDisable(GL11.GL_LIGHTING);\n+\n+\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n+\t\tglClearDepth(1);\n+\n+\t\tglEnable(GL11.GL_BLEND);\n+\t\tglBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);","path":"src/main/java/org/systemexception/lunarlander/main/Main.java","position":82,"original_position":82,"commit_id":"5c1bec23bd4c74ea5c1fb325e318b23c7965cabe","original_commit_id":"5c1bec23bd4c74ea5c1fb325e318b23c7965cabe","user":{"login":"lcappuccio","id":9638971,"avatar_url":"https://avatars.githubusercontent.com/u/9638971?v=3","gravatar_id":"","url":"https://api.github.com/users/lcappuccio","html_url":"https://github.com/lcappuccio","followers_url":"https://api.github.com/users/lcappuccio/followers","following_url":"https://api.github.com/users/lcappuccio/following{/other_user}","gists_url":"https://api.github.com/users/lcappuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/lcappuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcappuccio/subscriptions","organizations_url":"https://api.github.com/users/lcappuccio/orgs","repos_url":"https://api.github.com/users/lcappuccio/repos","events_url":"https://api.github.com/users/lcappuccio/events{/privacy}","received_events_url":"https://api.github.com/users/lcappuccio/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/versioned/images/favicon.png) Issue found: [Unnecessary use of fully qualified name 'GL11.GL_SRC_ALPHA' due to existing import 'org.lwjgl.opengl.GL11'](https://www.codacy.com/app/leo_4/lunar-lander/file/1692129201/issues/source?bid=3040650&fileBranchId=3043231#l82)","created_at":"2015-12-30T16:08:20Z","updated_at":"2015-12-30T16:08:20Z","html_url":"https://github.com/lcappuccio/lunar-lander/pull/5#discussion_r48612479","pull_request_url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/comments/48612479"},"html":{"href":"https://github.com/lcappuccio/lunar-lander/pull/5#discussion_r48612479"},"pull_request":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5","id":54809861,"html_url":"https://github.com/lcappuccio/lunar-lander/pull/5","diff_url":"https://github.com/lcappuccio/lunar-lander/pull/5.diff","patch_url":"https://github.com/lcappuccio/lunar-lander/pull/5.patch","issue_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/5","number":5,"state":"open","locked":false,"title":"Develop","user":{"login":"lcappuccio","id":9638971,"avatar_url":"https://avatars.githubusercontent.com/u/9638971?v=3","gravatar_id":"","url":"https://api.github.com/users/lcappuccio","html_url":"https://github.com/lcappuccio","followers_url":"https://api.github.com/users/lcappuccio/followers","following_url":"https://api.github.com/users/lcappuccio/following{/other_user}","gists_url":"https://api.github.com/users/lcappuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/lcappuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcappuccio/subscriptions","organizations_url":"https://api.github.com/users/lcappuccio/orgs","repos_url":"https://api.github.com/users/lcappuccio/repos","events_url":"https://api.github.com/users/lcappuccio/events{/privacy}","received_events_url":"https://api.github.com/users/lcappuccio/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-30T16:06:31Z","updated_at":"2015-12-30T16:08:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"494caac8418aca566b479db20a8cf95c440e1bff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5/commits","review_comments_url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5/comments","review_comment_url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/5/comments","statuses_url":"https://api.github.com/repos/lcappuccio/lunar-lander/statuses/5c1bec23bd4c74ea5c1fb325e318b23c7965cabe","head":{"label":"lcappuccio:develop","ref":"develop","sha":"5c1bec23bd4c74ea5c1fb325e318b23c7965cabe","user":{"login":"lcappuccio","id":9638971,"avatar_url":"https://avatars.githubusercontent.com/u/9638971?v=3","gravatar_id":"","url":"https://api.github.com/users/lcappuccio","html_url":"https://github.com/lcappuccio","followers_url":"https://api.github.com/users/lcappuccio/followers","following_url":"https://api.github.com/users/lcappuccio/following{/other_user}","gists_url":"https://api.github.com/users/lcappuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/lcappuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcappuccio/subscriptions","organizations_url":"https://api.github.com/users/lcappuccio/orgs","repos_url":"https://api.github.com/users/lcappuccio/repos","events_url":"https://api.github.com/users/lcappuccio/events{/privacy}","received_events_url":"https://api.github.com/users/lcappuccio/received_events","type":"User","site_admin":false},"repo":{"id":48707018,"name":"lunar-lander","full_name":"lcappuccio/lunar-lander","owner":{"login":"lcappuccio","id":9638971,"avatar_url":"https://avatars.githubusercontent.com/u/9638971?v=3","gravatar_id":"","url":"https://api.github.com/users/lcappuccio","html_url":"https://github.com/lcappuccio","followers_url":"https://api.github.com/users/lcappuccio/followers","following_url":"https://api.github.com/users/lcappuccio/following{/other_user}","gists_url":"https://api.github.com/users/lcappuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/lcappuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcappuccio/subscriptions","organizations_url":"https://api.github.com/users/lcappuccio/orgs","repos_url":"https://api.github.com/users/lcappuccio/repos","events_url":"https://api.github.com/users/lcappuccio/events{/privacy}","received_events_url":"https://api.github.com/users/lcappuccio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lcappuccio/lunar-lander","description":"Lunar Lander Game","fork":false,"url":"https://api.github.com/repos/lcappuccio/lunar-lander","forks_url":"https://api.github.com/repos/lcappuccio/lunar-lander/forks","keys_url":"https://api.github.com/repos/lcappuccio/lunar-lander/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lcappuccio/lunar-lander/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lcappuccio/lunar-lander/teams","hooks_url":"https://api.github.com/repos/lcappuccio/lunar-lander/hooks","issue_events_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/events{/number}","events_url":"https://api.github.com/repos/lcappuccio/lunar-lander/events","assignees_url":"https://api.github.com/repos/lcappuccio/lunar-lander/assignees{/user}","branches_url":"https://api.github.com/repos/lcappuccio/lunar-lander/branches{/branch}","tags_url":"https://api.github.com/repos/lcappuccio/lunar-lander/tags","blobs_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/refs{/sha}","trees_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lcappuccio/lunar-lander/statuses/{sha}","languages_url":"https://api.github.com/repos/lcappuccio/lunar-lander/languages","stargazers_url":"https://api.github.com/repos/lcappuccio/lunar-lander/stargazers","contributors_url":"https://api.github.com/repos/lcappuccio/lunar-lander/contributors","subscribers_url":"https://api.github.com/repos/lcappuccio/lunar-lander/subscribers","subscription_url":"https://api.github.com/repos/lcappuccio/lunar-lander/subscription","commits_url":"https://api.github.com/repos/lcappuccio/lunar-lander/commits{/sha}","git_commits_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/commits{/sha}","comments_url":"https://api.github.com/repos/lcappuccio/lunar-lander/comments{/number}","issue_comment_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/comments{/number}","contents_url":"https://api.github.com/repos/lcappuccio/lunar-lander/contents/{+path}","compare_url":"https://api.github.com/repos/lcappuccio/lunar-lander/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lcappuccio/lunar-lander/merges","archive_url":"https://api.github.com/repos/lcappuccio/lunar-lander/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lcappuccio/lunar-lander/downloads","issues_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues{/number}","pulls_url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls{/number}","milestones_url":"https://api.github.com/repos/lcappuccio/lunar-lander/milestones{/number}","notifications_url":"https://api.github.com/repos/lcappuccio/lunar-lander/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lcappuccio/lunar-lander/labels{/name}","releases_url":"https://api.github.com/repos/lcappuccio/lunar-lander/releases{/id}","created_at":"2015-12-28T18:45:47Z","updated_at":"2015-12-28T21:02:03Z","pushed_at":"2015-12-30T16:06:37Z","git_url":"git://github.com/lcappuccio/lunar-lander.git","ssh_url":"git@github.com:lcappuccio/lunar-lander.git","clone_url":"https://github.com/lcappuccio/lunar-lander.git","svn_url":"https://github.com/lcappuccio/lunar-lander","homepage":null,"size":6165,"stargazers_count":0,"watchers_count":0,"language":"Java","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":0,"default_branch":"master"}},"base":{"label":"lcappuccio:master","ref":"master","sha":"c9e2281ea61a72be460d65f3c3503ca88e773a66","user":{"login":"lcappuccio","id":9638971,"avatar_url":"https://avatars.githubusercontent.com/u/9638971?v=3","gravatar_id":"","url":"https://api.github.com/users/lcappuccio","html_url":"https://github.com/lcappuccio","followers_url":"https://api.github.com/users/lcappuccio/followers","following_url":"https://api.github.com/users/lcappuccio/following{/other_user}","gists_url":"https://api.github.com/users/lcappuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/lcappuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcappuccio/subscriptions","organizations_url":"https://api.github.com/users/lcappuccio/orgs","repos_url":"https://api.github.com/users/lcappuccio/repos","events_url":"https://api.github.com/users/lcappuccio/events{/privacy}","received_events_url":"https://api.github.com/users/lcappuccio/received_events","type":"User","site_admin":false},"repo":{"id":48707018,"name":"lunar-lander","full_name":"lcappuccio/lunar-lander","owner":{"login":"lcappuccio","id":9638971,"avatar_url":"https://avatars.githubusercontent.com/u/9638971?v=3","gravatar_id":"","url":"https://api.github.com/users/lcappuccio","html_url":"https://github.com/lcappuccio","followers_url":"https://api.github.com/users/lcappuccio/followers","following_url":"https://api.github.com/users/lcappuccio/following{/other_user}","gists_url":"https://api.github.com/users/lcappuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/lcappuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcappuccio/subscriptions","organizations_url":"https://api.github.com/users/lcappuccio/orgs","repos_url":"https://api.github.com/users/lcappuccio/repos","events_url":"https://api.github.com/users/lcappuccio/events{/privacy}","received_events_url":"https://api.github.com/users/lcappuccio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lcappuccio/lunar-lander","description":"Lunar Lander Game","fork":false,"url":"https://api.github.com/repos/lcappuccio/lunar-lander","forks_url":"https://api.github.com/repos/lcappuccio/lunar-lander/forks","keys_url":"https://api.github.com/repos/lcappuccio/lunar-lander/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lcappuccio/lunar-lander/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lcappuccio/lunar-lander/teams","hooks_url":"https://api.github.com/repos/lcappuccio/lunar-lander/hooks","issue_events_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/events{/number}","events_url":"https://api.github.com/repos/lcappuccio/lunar-lander/events","assignees_url":"https://api.github.com/repos/lcappuccio/lunar-lander/assignees{/user}","branches_url":"https://api.github.com/repos/lcappuccio/lunar-lander/branches{/branch}","tags_url":"https://api.github.com/repos/lcappuccio/lunar-lander/tags","blobs_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/refs{/sha}","trees_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lcappuccio/lunar-lander/statuses/{sha}","languages_url":"https://api.github.com/repos/lcappuccio/lunar-lander/languages","stargazers_url":"https://api.github.com/repos/lcappuccio/lunar-lander/stargazers","contributors_url":"https://api.github.com/repos/lcappuccio/lunar-lander/contributors","subscribers_url":"https://api.github.com/repos/lcappuccio/lunar-lander/subscribers","subscription_url":"https://api.github.com/repos/lcappuccio/lunar-lander/subscription","commits_url":"https://api.github.com/repos/lcappuccio/lunar-lander/commits{/sha}","git_commits_url":"https://api.github.com/repos/lcappuccio/lunar-lander/git/commits{/sha}","comments_url":"https://api.github.com/repos/lcappuccio/lunar-lander/comments{/number}","issue_comment_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/comments{/number}","contents_url":"https://api.github.com/repos/lcappuccio/lunar-lander/contents/{+path}","compare_url":"https://api.github.com/repos/lcappuccio/lunar-lander/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lcappuccio/lunar-lander/merges","archive_url":"https://api.github.com/repos/lcappuccio/lunar-lander/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lcappuccio/lunar-lander/downloads","issues_url":"https://api.github.com/repos/lcappuccio/lunar-lander/issues{/number}","pulls_url":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls{/number}","milestones_url":"https://api.github.com/repos/lcappuccio/lunar-lander/milestones{/number}","notifications_url":"https://api.github.com/repos/lcappuccio/lunar-lander/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lcappuccio/lunar-lander/labels{/name}","releases_url":"https://api.github.com/repos/lcappuccio/lunar-lander/releases{/id}","created_at":"2015-12-28T18:45:47Z","updated_at":"2015-12-28T21:02:03Z","pushed_at":"2015-12-30T16:06:37Z","git_url":"git://github.com/lcappuccio/lunar-lander.git","ssh_url":"git@github.com:lcappuccio/lunar-lander.git","clone_url":"https://github.com/lcappuccio/lunar-lander.git","svn_url":"https://github.com/lcappuccio/lunar-lander","homepage":null,"size":6165,"stargazers_count":0,"watchers_count":0,"language":"Java","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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5"},"html":{"href":"https://github.com/lcappuccio/lunar-lander/pull/5"},"issue":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/5"},"comments":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/lcappuccio/lunar-lander/statuses/5c1bec23bd4c74ea5c1fb325e318b23c7965cabe"}}}}