コード例 #1
0
def redraw_board():
    gameloop.init()
    theme.update()  # This is going to create the new theme if it doesn't exist

    # Force the game to update
    graphics.drawGame()
    graphics.update()
コード例 #2
0
def init():
    global state, speed, last_update

    # set the initial time for the first update with the current time
    last_update = time.time()

    game.score = 0
    game.reset()
    graphics.drawGame()
    state = 1
    try:
        speed = config.game_speed[parser.args.speed]
    except:
        speed = config.game_speed['m']

    livesIn = parser.args.lives
    if livesIn >= 1 and livesIn <= 5:
        game.lives = livesIn
        game.livesMax = livesIn
    elif livesIn > 5:
        game.lives = 5
        game.livesMax = 5
    else:
        game.lives = 1
        game.livesMax = 1
コード例 #3
0
ファイル: controls.py プロジェクト: KanoComputing/make-snake
def redraw_board():
    gameloop.init()
    theme.update()  # This is going to create the new theme if it doesn't exist

    # Force the game to update
    graphics.drawGame()
    graphics.update()
コード例 #4
0
ファイル: gameloop.py プロジェクト: pdinsky/make-snake
def init():
    game.init()
    graphics.drawGame()
    graphics.update()
コード例 #5
0
def reset():
    game.reset()
    graphics.drawGame()
コード例 #6
0
def init():
    global state

    game.init()
    graphics.drawGame()
    state = 0