Add displaying of a simple window.
[tabakrolletjie.git] / tabakrolletjie / main.py
diff --git a/tabakrolletjie/main.py b/tabakrolletjie/main.py
new file mode 100644 (file)
index 0000000..77af827
--- /dev/null
@@ -0,0 +1,24 @@
+""" Run tabakrolletjie.
+"""
+
+import pygame
+import pygame.locals as pgl
+
+from .constants import SCREEN_SIZE, TITLE
+from .engine import Engine
+from .scenes.menu import MenuScene
+
+
+def main():
+    pygame.display.init()
+    pygame.font.init()
+
+    pygame.display.set_mode(SCREEN_SIZE, pgl.SWSURFACE)
+    pygame.display.set_caption(TITLE)
+    # TODO: set an icon
+
+    screen = pygame.display.get_surface()
+    scene = MenuScene()
+    engine = Engine(screen, scene)
+
+    engine.run()