Exemplo n.º 1
0
def start():
    try:
        display.init()
        control.init()
        gameloop.start()
    finally:
        control.finish()
        display.exit()
        print("Game over! Score - ", Game.GameState().score)
Exemplo n.º 2
0
def run():
    try:
        parser.init()
        stage.init()
        graphics.init()
        theme.init()
        gameloop.start()

    except KeyboardInterrupt:
        exit()
Exemplo n.º 3
0
def run():
    try:
        parser.init()
        stage.init()
        graphics.init()
        theme.init()
        gameloop.start()

    except KeyboardInterrupt:
        exit()
Exemplo n.º 4
0
def run():
    try:
        # Init the editor
        graphics.init()
        theme.init()

        # Start the editor
        gameloop.start()

    except KeyboardInterrupt:
        exit()
Exemplo n.º 5
0
def run():
    try:
        # Init the editor
        graphics.init()
        theme.init()

        # Start the editor
        gameloop.start()

    except KeyboardInterrupt:
        exit()
Exemplo n.º 6
0
def run():
    try:
        # Init the game
        parser.init()
        # Check for editor
        if (parser.args.editor):
            os.system("/usr/share/make-snake/snake-editor/__main__.py")
            sys.exit(0)
        graphics.init()
        theme.init()
        stage.init()
        game.reset()

        # Start the game
        gameloop.start()

    except KeyboardInterrupt:
        exit()
Exemplo n.º 7
0
def run():
    try:
        # Init the game
        parser.init()
        # Check for editor
        if (parser.args.editor):
            os.system("/usr/share/make-snake/snake-editor/__main__.py")
            sys.exit(0)
        graphics.init()
        theme.init()
        stage.init()
        game.reset()

        # Start the game
        gameloop.start()

    except KeyboardInterrupt:
        exit()