def play_round(self, progress_bar, fast=False): if not self.league_completed: r = self.rounds[self.actual_round] n = r.get_number_of_games() for i in range(n): if fast: progress_bar.pulse() while gtk.events_pending(): gtk.main_iteration(False) r.play_match(fast) p = r.get_puntuation() self.puntuations_by_round.append(p) contest.merge_puntuations(self.puntuations, p) f_log = open(self.tournament_file_name, 'a') f_log.write('Ronda ' + str(self.actual_round+1) + ":\n") f_log.close() r.log_tournament(True) f_log = open(self.tournament_file_name, 'a') f_log.write('-------------------------------' + "\n") f_log.close() self.actual_round = self.actual_round + 1 self.league_completed = (self.actual_round == self.number_of_rounds)
def play_round(self, progress_bar, fast=False): if not self.league_completed and not controlPartida.flagCancelarCampeonato: r = self.rounds[self.current_round] n = r.get_number_of_games() for i in range(n): if controlPartida.flagCancelarCampeonato: return if fast and progress_bar != None: progress_bar.pulse() while gtk.events_pending(): gtk.main_iteration(False) r.play_match(fast, log_folder = self.log_folder) p = r.get_puntuation() self.puntuations_by_round.append(p) contest.merge_puntuations(self.puntuations, p) self.current_round = self.current_round + 1 self.league_completed = (self.current_round == self.number_of_rounds)
def play_round(self, progress_bar, fast=False): if not self.league_completed and not controlPartida.flagCancelarCampeonato: r = self.rounds[self.current_round] n = r.get_number_of_games() for i in range(n): if controlPartida.flagCancelarCampeonato: return if fast and progress_bar != None: progress_bar.pulse() while gtk.events_pending(): gtk.main_iteration(False) r.play_match(fast, log_folder=self.log_folder) p = r.get_puntuation() self.puntuations_by_round.append(p) contest.merge_puntuations(self.puntuations, p) self.current_round = self.current_round + 1 self.league_completed = ( self.current_round == self.number_of_rounds)