def run(): try: parser.init() stage.init() graphics.init() theme.init() gameloop.start() except KeyboardInterrupt: exit()
def init(): global screen, menuYPos screen = curses.initscr() curses.noecho() curses.cbreak() curses.curs_set(0) curses.start_color() screen.nodelay(1) # Init stage stage.init() if stage.resolution > 768: menuYPos = 10 else: menuYPos = 4
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()