view mamba/__main__.py @ 12:0196455fa432

Minimal event loop.
author Simon Cross <hodgestar@gmail.com>
date Sun, 11 Sep 2011 13:11:52 +0200
parents 447311ee028c
children ad2bcbf492bf
line wrap: on
line source

"""Main module for the game"""

import sys
import os
import pygame
from pygame.locals import SWSURFACE

from mamba.constants import SCREEN
from mamba.engine import Engine

# For future use
DEBUG = False
if os.environ.get('DEBUG'):
    DEBUG = True


def main():
    """Launch the currently unnamed mamab game"""

    pygame.display.init()
    pygame.font.init()
    # TODO: Sound initialisation
    pygame.display.set_mode(SCREEN, SWSURFACE)
    pygame.display.set_caption('Mamba')

    engine = Engine()
    engine.run()