def main(): # parse command line arguments to script args = parse_arguments() # set up bots by loading from source files bots = [LocalBot(arg, i) for (i, arg) in enumerate(args.botfiles)] # initialize the match game = Game(bots, args.uniform) # run the match game.start() # clean up after ourselves for bot in bots: bot.cleanup() # write the replay file with open(REPLAY_FN, "w") as f: f.write(game.get_raw_log()) f.close()