def run_game(self): if self.opts.get('verbose_log', None): self.opts['verbose_log'].write("map path: " + str(self.map_path) + "\n") with open(self.map_path) as fo: map_text = "".join(fo.readlines()) self.opts['map'] = map_text game = tron.Tron(self.opts) game_result = engine.run_game(game, self.players, self.opts) game_result['playernames'] = self.player_names return game_result
def run_game(self): #map_path = os.path.join(maps_path, temp_map) print("map path: " + str(self.map_path)) with open(self.map_path) as fo: map_text = "".join(fo.readlines()) self.opts['map'] = map_text game = tron.Tron(self.opts) game_result = engine.run_game(game, self.players, self.opts) game_result['playernames'] = self.player_names print(game_result) return game_result
def run_game(self): #map_path = os.path.join(maps_path, temp_map) print("map path: " + str(self.map_path)) with open(self.map_path) as fo: map_text = "".join(fo.readlines()) self.opts['map'] = map_text game = planetwars.PlanetWars(self.opts) game_result = engine.run_game(game, self.players, self.opts) game_result['playernames'] = self.player_names if 'replaydata' in game_result: game_result['replaydata']['player_one'] = self.player_names[0] game_result['replaydata']['player_two'] = self.player_names[1] game_result['replaydata']['playernames'] = self.player_names print(game_result) return game_result
def run_game(self): # map_path = os.path.join(maps_path, temp_map) print("map path: " + str(self.map_path)) with open(self.map_path) as fo: map_text = "".join(fo.readlines()) self.opts['map'] = map_text game = ants.Ants(self.opts) game_result = engine.run_game(game, self.players, self.opts) game_result['playernames'] = self.player_names if 'replaydata' in game_result: game_result['replaydata']['playernames'] = self.player_names game_result['replaydata']['user_ids'] = self.player_names else: pass #FIXME logging print("Player names = " + str(self.player_names)) print(game_result) return game_result