def __init__(self): if Code.list_engine_managers is None: Code.list_engine_managers = EngineManager.ListEngineManagers() self.web = "https://lucaschess.pythonanywhere.com" self.blog = "https://lucaschess.blogspot.com" self.github = "https://github.com/lukasmonk/lucaschessR"
def __init__(self, file_tournament, file_work): QtWidgets.QWidget.__init__(self) Code.list_engine_managers = EngineManager.ListEngineManagers() self.torneo = TournamentRun( file_tournament) # Tournament.Tournament(file_tournament) self.file_work = file_work self.db_work = UtilSQL.ListSQL(file_work) self.slow_pieces = self.torneo.slow_pieces() self.setWindowTitle( "%s - %s %d" % (self.torneo.name(), _("Worker"), int(file_work[-5:]))) self.setWindowIcon(Iconos.Torneos()) # Toolbar self.tb = Controles.TBrutina(self, icon_size=24) # Board conf_board = Code.configuration.config_board("TOURNEYPLAY", 36) self.board = Board.Board(self, conf_board) self.board.crea() Delegados.generaPM(self.board.piezas) # PGN self.configuration = Code.configuration self.game = Game.Game() self.pgn = ControlPGN.ControlPGN(self) ly_pgn = self.crea_bloque_informacion() self.is_closed = False self.state = None self.current_side = WHITE ly_tt = Colocacion.V().control(self.tb).control(self.board) layout = Colocacion.H().otro(ly_tt).otro(ly_pgn).relleno().margen(3) self.setLayout(layout) self.cpu = CPU.CPU(self) self.pon_estado(ST_WAITING)