+""" Engine for moving controll scenes and tranistions between them.
+"""
+
+import pygame.display
+import pygame.event
+import pygame.time
+
+import pygame.locals as pgl
+
+from .constants import FPS
+
+
+class Engine(object):
+ def __init__(self, screen, scene):
+ self._screen = screen
+ self._scene = scene
+
+ def run(self):
+ clock = pygame.time.Clock()
+
+ while True:
+ events = pygame.event.get()
+ for ev in events:
+ if ev.type == pgl.QUIT:
+ return
+ else:
+ pass # TODO: send to scene
+
+ # TODO: render scene
+ pygame.display.flip()
+
+ clock.tick(FPS)