+class Engine:
+ """ A holder for game state. """
+
+ def __init__(self, app, scene):
+ self._app = app
+ self._scene = scene
+
+ def update(self, dt):
+ self._scene.update(dt)
+
+ def draw(self):
+ self._scene.draw(self._app.screen)
+
+ def on_mouse_down(self, pos, button):
+ self._scene.on_mouse_down(pos, button)
+
+ def on_mouse_up(self, pos, button):
+ self._scene.on_mouse_up(pos, button)
+
+ def on_key_down(self, key, mod, unicode):
+ self._scene.on_key_down(key, mod, unicode)
+
+ def on_key_up(self, key, mod):
+ self._scene.on_key_up(key, mod)
+
+ def on_music_end(self):
+ self._scene.on_music_end()
+
+