import sys
import pygame
+import pygame.locals as pgl
+from naja.constants import SCREEN
+from naja.engine import Engine
from naja.options import parse_args
pygame.display.init()
pygame.font.init()
- raise NotImplementedError("Sorry, we haven't written a game yet.")
+ pygame.display.set_mode(SCREEN, pgl.SWSURFACE)
+ pygame.display.set_caption('Naja')
+
+ screen = pygame.display.get_surface()
+ engine = Engine(screen)
+ engine.run()
--- /dev/null
+import pygame
+import pygame.locals as pgl
+
+
+class Engine(object):
+ def __init__(self, surface):
+ self._surface = surface
+
+ def run(self):
+ while True:
+ for ev in pygame.event.get():
+ if ev.type == pgl.QUIT:
+ return
+ # TODO: work
+ pygame.display.flip()