Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
game.set_console_enabled(console_enabled)
game.add_available_button(vzd.Button.TURN_LEFT)
game.add_available_button(vzd.Button.TURN_RIGHT)
game.add_available_button(vzd.Button.MOVE_RIGHT)
game.add_available_button(vzd.Button.MOVE_LEFT)
game.add_available_button(vzd.Button.MOVE_FORWARD)
game.add_available_button(vzd.Button.MOVE_BACKWARD)
game.add_available_button(vzd.Button.TURN_LEFT_RIGHT_DELTA)
game.add_available_button(vzd.Button.LOOK_UP_DOWN_DELTA)
game.add_available_button(vzd.Button.SPEED)
game.add_available_button(vzd.Button.MOVE_UP)
game.add_available_button(vzd.Button.MOVE_DOWN)
if watch:
game.set_mode(vzd.Mode.ASYNC_SPECTATOR)
game.set_window_visible(True)
else:
game.set_mode(vzd.Mode.ASYNC_PLAYER)
game.set_window_visible(False)
game.set_screen_resolution(vzd.ScreenResolution.RES_1024X576)
plural = "s"
pn = "no"
if players_num > 1:
pn = players_num - 1
if players_num == 2:
plural = ""
if record_file is not None and bots_num > 0:
warn("Recording won't work properly with bots!")