{"action":"created","comment":{"url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/comments/175277588","pull_request_review_id":104785820,"id":175277588,"diff_hunk":"@@ -1,121 +1,124 @@\n-import sys\n import os\n-import random\n+import sys\n+\n import pygame\n from pygame.locals import *\n \n+from src.HUD import HUD\n from src.const import *\n+from src.game_object.Foe.basicfoe import *\n from src.game_object.backdrop import Backdrop\n from src.game_object.player import Player\n from src.game_object.wall import Wall\n-from src.HUD import HUD\n-from src.game_object.Foe.basicfoe import *\n+\n \n class Game:\n-    \n+\n     def __init__(self):\n         # pygame window setups\n         os.environ['SDL_VIDEO_CENTERED'] = '1'  # center window\n         pygame.init()\n         pygame.display.set_caption(CAPTION)\n         self.surface = pygame.display.set_mode((DISPLAY_WIDTH, DISPLAY_HEIGHT), 0, 32)\n-        \n+\n         self.pan_speed = PAN_SPEED\n-        \n+\n         self.entities = {GLOBAL_SPRITE_GROUP: pygame.sprite.Group()}\n \n         self.fps_clock = pygame.time.Clock()\n         self.hud = HUD(self)\n-        \n+\n+        self.events = pygame.event.get()\n+\n         self.set_up()\n         self.run()\n-    \n+\n     def set_up(self):\n         # init player spawn\n         player = Player(self, (200, 100))\n         self.add_entity(player)\n-    \n+\n         # init wall cd\n-        self.wallCd = 0 #WALL_RATE\n+        self.wallCd = 0  # WALL_RATE\n \n-        #initial monster cd\n+        #init monster cd\n         self.monsterCd = 5\n \n         # backdrop\n         backdrop = Backdrop(self, left=0)\n         self.add_entity(backdrop)\n-        \n+\n     def run(self):\n         while True:\n             self.surface.fill(L_GREY)\n \n             self.pan_speed = PAN_SPEED\n-            \n+\n             # update all objects\n             for sprite in self.entities[GLOBAL_SPRITE_GROUP]:\n                 sprite.update()\n-            \n+\n             # draw abased on depth\n             for sprite in sorted(self.entities[GLOBAL_SPRITE_GROUP],\n                                  key=lambda sprite: sprite.depth,\n                                  reverse=True):\n                 sprite.draw()\n-                \n+\n             # wall creation\n             if self.wallCd <= 0:\n                 self.wallCd = WALL_RATE\n                 self.make_walls()\n             self.wallCd -= 1\n \n-            #monster creation\n+            # monster creation\n             new_enemy = BasicFoe(self)\n             if self.monsterCd <= 0:\n                 self.monsterCd = MONSTER_RATE\n                 self.add_entity(new_enemy)\n                 print(\"monster added\")\n             self.monsterCd -= 1\n-            \n+\n             # hud\n             self.hud.draw()\n-            \n+\n             # fps and update display\n             pygame.display.update()\n             self.fps_clock.tick(FPS)\n-        \n-            \n-            for event in pygame.event.get():\n+\n+            self.events = pygame.event.get()\n+            for event in self.events:\n                 if event.type == QUIT:\n                     pygame.quit()\n                     sys.exit()\n                 if event.type == KEYDOWN and event.key == K_TAB:\n                     self.hud.mode_toggle()\n-            \n+\n     def add_entity(self, object):\n         # add to its own sprite group\n         class_name = object.__class__.__name__\n         if class_name not in self.entities:\n             self.entities[class_name] = pygame.sprite.Group()\n         self.entities[class_name].add(object)\n-        \n+\n         # also add to global sprite group\n         self.entities[GLOBAL_SPRITE_GROUP].add(object)\n-    \n+\n     def make_walls(self):\n-        gap_height = random.randint(GAP_SIZE/2, DISPLAY_HEIGHT-GAP_SIZE/2)\n+        gap_height = random.randint(GAP_SIZE / 2, DISPLAY_HEIGHT - GAP_SIZE / 2)\n         gap_top = gap_height - GAP_SIZE / 2\n         gap_bottom = gap_height + GAP_SIZE / 2\n-        \n+\n         # # top wall\n         # top_height = gap_top\n         # top_wall = Wall(self, (DISPLAY_WIDTH+WALL_WIDTH, top_height / 2), (WALL_WIDTH, top_height))\n         # self.add_entity(top_wall)\n-    \n+\n         # bottom wall\n         bottom_height = DISPLAY_HEIGHT - gap_bottom\n-        bottom_wall = Wall(self, (DISPLAY_WIDTH+WALL_WIDTH, gap_bottom + bottom_height / 2), (WALL_WIDTH, bottom_height))\n+        bottom_wall = Wall(self, (DISPLAY_WIDTH + WALL_WIDTH, gap_bottom + bottom_height / 2),\n+                           (WALL_WIDTH, bottom_height))\n         self.add_entity(bottom_wall)\n \n-        \n-        \n+\n if __name__ == \"__main__\":\n     Game()","path":"main.py","position":153,"original_position":155,"commit_id":"435fc26ef7404411923aecc6dc94a374570b4187","original_commit_id":"9351d3af1f12dbca15d142c601fbdf4ceecdbb95","user":{"login":"allantsai3","id":31875809,"avatar_url":"https://avatars3.githubusercontent.com/u/31875809?v=4","gravatar_id":"","url":"https://api.github.com/users/allantsai3","html_url":"https://github.com/allantsai3","followers_url":"https://api.github.com/users/allantsai3/followers","following_url":"https://api.github.com/users/allantsai3/following{/other_user}","gists_url":"https://api.github.com/users/allantsai3/gists{/gist_id}","starred_url":"https://api.github.com/users/allantsai3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allantsai3/subscriptions","organizations_url":"https://api.github.com/users/allantsai3/orgs","repos_url":"https://api.github.com/users/allantsai3/repos","events_url":"https://api.github.com/users/allantsai3/events{/privacy}","received_events_url":"https://api.github.com/users/allantsai3/received_events","type":"User","site_admin":false},"body":"autoformat not op","created_at":"2018-03-18T05:14:32Z","updated_at":"2018-03-18T05:14:32Z","html_url":"https://github.com/ozcer/Project-Ooze/pull/9#discussion_r175277588","pull_request_url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/comments/175277588"},"html":{"href":"https://github.com/ozcer/Project-Ooze/pull/9#discussion_r175277588"},"pull_request":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9"}},"in_reply_to_id":175277392},"pull_request":{"url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9","id":175678485,"html_url":"https://github.com/ozcer/Project-Ooze/pull/9","diff_url":"https://github.com/ozcer/Project-Ooze/pull/9.diff","patch_url":"https://github.com/ozcer/Project-Ooze/pull/9.patch","issue_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues/9","number":9,"state":"open","locked":false,"title":"Feature/#8_Foe_and_BasicFoe_classes","user":{"login":"allantsai3","id":31875809,"avatar_url":"https://avatars3.githubusercontent.com/u/31875809?v=4","gravatar_id":"","url":"https://api.github.com/users/allantsai3","html_url":"https://github.com/allantsai3","followers_url":"https://api.github.com/users/allantsai3/followers","following_url":"https://api.github.com/users/allantsai3/following{/other_user}","gists_url":"https://api.github.com/users/allantsai3/gists{/gist_id}","starred_url":"https://api.github.com/users/allantsai3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allantsai3/subscriptions","organizations_url":"https://api.github.com/users/allantsai3/orgs","repos_url":"https://api.github.com/users/allantsai3/repos","events_url":"https://api.github.com/users/allantsai3/events{/privacy}","received_events_url":"https://api.github.com/users/allantsai3/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-17T02:15:29Z","updated_at":"2018-03-18T05:14:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"026b73e8eb00ffb5839f347960be62de1bbe200a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues/9/comments","statuses_url":"https://api.github.com/repos/ozcer/Project-Ooze/statuses/435fc26ef7404411923aecc6dc94a374570b4187","head":{"label":"ozcer:Enhancement/#8_Enemies_class","ref":"Enhancement/#8_Enemies_class","sha":"435fc26ef7404411923aecc6dc94a374570b4187","user":{"login":"ozcer","id":9907334,"avatar_url":"https://avatars2.githubusercontent.com/u/9907334?v=4","gravatar_id":"","url":"https://api.github.com/users/ozcer","html_url":"https://github.com/ozcer","followers_url":"https://api.github.com/users/ozcer/followers","following_url":"https://api.github.com/users/ozcer/following{/other_user}","gists_url":"https://api.github.com/users/ozcer/gists{/gist_id}","starred_url":"https://api.github.com/users/ozcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozcer/subscriptions","organizations_url":"https://api.github.com/users/ozcer/orgs","repos_url":"https://api.github.com/users/ozcer/repos","events_url":"https://api.github.com/users/ozcer/events{/privacy}","received_events_url":"https://api.github.com/users/ozcer/received_events","type":"User","site_admin":false},"repo":{"id":123733106,"name":"Project-Ooze","full_name":"ozcer/Project-Ooze","owner":{"login":"ozcer","id":9907334,"avatar_url":"https://avatars2.githubusercontent.com/u/9907334?v=4","gravatar_id":"","url":"https://api.github.com/users/ozcer","html_url":"https://github.com/ozcer","followers_url":"https://api.github.com/users/ozcer/followers","following_url":"https://api.github.com/users/ozcer/following{/other_user}","gists_url":"https://api.github.com/users/ozcer/gists{/gist_id}","starred_url":"https://api.github.com/users/ozcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozcer/subscriptions","organizations_url":"https://api.github.com/users/ozcer/orgs","repos_url":"https://api.github.com/users/ozcer/repos","events_url":"https://api.github.com/users/ozcer/events{/privacy}","received_events_url":"https://api.github.com/users/ozcer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ozcer/Project-Ooze","description":null,"fork":false,"url":"https://api.github.com/repos/ozcer/Project-Ooze","forks_url":"https://api.github.com/repos/ozcer/Project-Ooze/forks","keys_url":"https://api.github.com/repos/ozcer/Project-Ooze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ozcer/Project-Ooze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ozcer/Project-Ooze/teams","hooks_url":"https://api.github.com/repos/ozcer/Project-Ooze/hooks","issue_events_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues/events{/number}","events_url":"https://api.github.com/repos/ozcer/Project-Ooze/events","assignees_url":"https://api.github.com/repos/ozcer/Project-Ooze/assignees{/user}","branches_url":"https://api.github.com/repos/ozcer/Project-Ooze/branches{/branch}","tags_url":"https://api.github.com/repos/ozcer/Project-Ooze/tags","blobs_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/refs{/sha}","trees_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ozcer/Project-Ooze/statuses/{sha}","languages_url":"https://api.github.com/repos/ozcer/Project-Ooze/languages","stargazers_url":"https://api.github.com/repos/ozcer/Project-Ooze/stargazers","contributors_url":"https://api.github.com/repos/ozcer/Project-Ooze/contributors","subscribers_url":"https://api.github.com/repos/ozcer/Project-Ooze/subscribers","subscription_url":"https://api.github.com/repos/ozcer/Project-Ooze/subscription","commits_url":"https://api.github.com/repos/ozcer/Project-Ooze/commits{/sha}","git_commits_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/commits{/sha}","comments_url":"https://api.github.com/repos/ozcer/Project-Ooze/comments{/number}","issue_comment_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues/comments{/number}","contents_url":"https://api.github.com/repos/ozcer/Project-Ooze/contents/{+path}","compare_url":"https://api.github.com/repos/ozcer/Project-Ooze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ozcer/Project-Ooze/merges","archive_url":"https://api.github.com/repos/ozcer/Project-Ooze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ozcer/Project-Ooze/downloads","issues_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues{/number}","pulls_url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls{/number}","milestones_url":"https://api.github.com/repos/ozcer/Project-Ooze/milestones{/number}","notifications_url":"https://api.github.com/repos/ozcer/Project-Ooze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ozcer/Project-Ooze/labels{/name}","releases_url":"https://api.github.com/repos/ozcer/Project-Ooze/releases{/id}","deployments_url":"https://api.github.com/repos/ozcer/Project-Ooze/deployments","created_at":"2018-03-03T21:30:55Z","updated_at":"2018-03-18T01:50:55Z","pushed_at":"2018-03-18T04:15:03Z","git_url":"git://github.com/ozcer/Project-Ooze.git","ssh_url":"git@github.com:ozcer/Project-Ooze.git","clone_url":"https://github.com/ozcer/Project-Ooze.git","svn_url":"https://github.com/ozcer/Project-Ooze","homepage":null,"size":78,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"ozcer:master","ref":"master","sha":"aabd3d5371f662a97b0bd2729439d2ccf7ba26ef","user":{"login":"ozcer","id":9907334,"avatar_url":"https://avatars2.githubusercontent.com/u/9907334?v=4","gravatar_id":"","url":"https://api.github.com/users/ozcer","html_url":"https://github.com/ozcer","followers_url":"https://api.github.com/users/ozcer/followers","following_url":"https://api.github.com/users/ozcer/following{/other_user}","gists_url":"https://api.github.com/users/ozcer/gists{/gist_id}","starred_url":"https://api.github.com/users/ozcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozcer/subscriptions","organizations_url":"https://api.github.com/users/ozcer/orgs","repos_url":"https://api.github.com/users/ozcer/repos","events_url":"https://api.github.com/users/ozcer/events{/privacy}","received_events_url":"https://api.github.com/users/ozcer/received_events","type":"User","site_admin":false},"repo":{"id":123733106,"name":"Project-Ooze","full_name":"ozcer/Project-Ooze","owner":{"login":"ozcer","id":9907334,"avatar_url":"https://avatars2.githubusercontent.com/u/9907334?v=4","gravatar_id":"","url":"https://api.github.com/users/ozcer","html_url":"https://github.com/ozcer","followers_url":"https://api.github.com/users/ozcer/followers","following_url":"https://api.github.com/users/ozcer/following{/other_user}","gists_url":"https://api.github.com/users/ozcer/gists{/gist_id}","starred_url":"https://api.github.com/users/ozcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozcer/subscriptions","organizations_url":"https://api.github.com/users/ozcer/orgs","repos_url":"https://api.github.com/users/ozcer/repos","events_url":"https://api.github.com/users/ozcer/events{/privacy}","received_events_url":"https://api.github.com/users/ozcer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ozcer/Project-Ooze","description":null,"fork":false,"url":"https://api.github.com/repos/ozcer/Project-Ooze","forks_url":"https://api.github.com/repos/ozcer/Project-Ooze/forks","keys_url":"https://api.github.com/repos/ozcer/Project-Ooze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ozcer/Project-Ooze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ozcer/Project-Ooze/teams","hooks_url":"https://api.github.com/repos/ozcer/Project-Ooze/hooks","issue_events_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues/events{/number}","events_url":"https://api.github.com/repos/ozcer/Project-Ooze/events","assignees_url":"https://api.github.com/repos/ozcer/Project-Ooze/assignees{/user}","branches_url":"https://api.github.com/repos/ozcer/Project-Ooze/branches{/branch}","tags_url":"https://api.github.com/repos/ozcer/Project-Ooze/tags","blobs_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/refs{/sha}","trees_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ozcer/Project-Ooze/statuses/{sha}","languages_url":"https://api.github.com/repos/ozcer/Project-Ooze/languages","stargazers_url":"https://api.github.com/repos/ozcer/Project-Ooze/stargazers","contributors_url":"https://api.github.com/repos/ozcer/Project-Ooze/contributors","subscribers_url":"https://api.github.com/repos/ozcer/Project-Ooze/subscribers","subscription_url":"https://api.github.com/repos/ozcer/Project-Ooze/subscription","commits_url":"https://api.github.com/repos/ozcer/Project-Ooze/commits{/sha}","git_commits_url":"https://api.github.com/repos/ozcer/Project-Ooze/git/commits{/sha}","comments_url":"https://api.github.com/repos/ozcer/Project-Ooze/comments{/number}","issue_comment_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues/comments{/number}","contents_url":"https://api.github.com/repos/ozcer/Project-Ooze/contents/{+path}","compare_url":"https://api.github.com/repos/ozcer/Project-Ooze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ozcer/Project-Ooze/merges","archive_url":"https://api.github.com/repos/ozcer/Project-Ooze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ozcer/Project-Ooze/downloads","issues_url":"https://api.github.com/repos/ozcer/Project-Ooze/issues{/number}","pulls_url":"https://api.github.com/repos/ozcer/Project-Ooze/pulls{/number}","milestones_url":"https://api.github.com/repos/ozcer/Project-Ooze/milestones{/number}","notifications_url":"https://api.github.com/repos/ozcer/Project-Ooze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ozcer/Project-Ooze/labels{/name}","releases_url":"https://api.github.com/repos/ozcer/Project-Ooze/releases{/id}","deployments_url":"https://api.github.com/repos/ozcer/Project-Ooze/deployments","created_at":"2018-03-03T21:30:55Z","updated_at":"2018-03-18T01:50:55Z","pushed_at":"2018-03-18T04:15:03Z","git_url":"git://github.com/ozcer/Project-Ooze.git","ssh_url":"git@github.com:ozcer/Project-Ooze.git","clone_url":"https://github.com/ozcer/Project-Ooze.git","svn_url":"https://github.com/ozcer/Project-Ooze","homepage":null,"size":78,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9"},"html":{"href":"https://github.com/ozcer/Project-Ooze/pull/9"},"issue":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/issues/9"},"comments":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ozcer/Project-Ooze/statuses/435fc26ef7404411923aecc6dc94a374570b4187"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"allantsai3"}}