Created
December 6, 2016 19:42
-
-
Save djm4686/89a8dfb09d7485cec3028289d680209d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
class GameController: | |
def __init__(self, width, height): | |
pygame.init() | |
self.width = width | |
self.height = height | |
self.running = True | |
self.surface = pygame.set_mode((width, height)) | |
# THIS IS WHERE YOU'D CREATE THE MAP | |
# from map_module import Map | |
# self.map = Map(rows, cols) | |
self.main() | |
def main(self): | |
while self.running: | |
self.event() | |
self.update() | |
self.draw() | |
def update(self): | |
pass | |
def event(self): | |
for event in pygame.event.get(): | |
if event.type == QUIT: | |
pygame.quit() | |
# else: | |
# self.map.handle_event(event) | |
def draw(self): | |
# self.map.draw(self.surface) | |
pass | |
if __name__ == "__main__": | |
gc = GameController(800, 600) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment