Merge branch 'master' of ctpug.org.za:tabakrolletjie
[tabakrolletjie.git] / tabakrolletjie / main.py
1 """ Run tabakrolletjie.
2 """
3
4 import pygame
5 import pygame.locals as pgl
6
7 from .constants import SCREEN_SIZE, TITLE
8 from .engine import Engine
9 from .gamestate import GameState
10 from .scenes.menu import MenuScene
11
12
13 def main():
14     pygame.display.init()
15     pygame.font.init()
16
17     pygame.display.set_mode(SCREEN_SIZE, pgl.SWSURFACE)
18     pygame.display.set_caption(TITLE)
19     # TODO: set an icon
20
21     screen = pygame.display.get_surface()
22     gamestate = GameState()
23     engine = Engine(screen, gamestate)
24     engine.set_scene(MenuScene())
25
26     engine.run()