コード例 #1
0
    def iniciarGUI(self):
        self.pantalla = Pantalla.PantallaWidget(self)
        self.pantalla.ponGestor(self)  # antes que muestra
        self.pantalla.muestra()

        self.tablero = self.pantalla.tablero

        self.entrenamientos = Entrenamientos.Entrenamientos(self)


        if self.configuracion.siAplazada:
            aplazamiento = self.configuracion.aplazamiento
            self.juegaAplazada(aplazamiento)
        else:
            if len(sys.argv) > 1:
                comando = sys.argv[1]
                comandoL = comando.lower()
                if comandoL.endswith(".pgn"):
                    aplazamiento = {}
                    aplazamiento["TIPOJUEGO"] = kJugPGN
                    aplazamiento["SIBLANCAS"] = True  # Compatibilidad
                    self.juegaAplazada(aplazamiento)
                    return
                elif comandoL.endswith(".pks"):
                    aplazamiento = {}
                    aplazamiento["TIPOJUEGO"] = kJugSolo
                    aplazamiento["SIBLANCAS"] = True  # Compatibilidad
                    self.juegaAplazada(aplazamiento)
                    return
                elif comandoL.endswith(".lcg"):
                    self.externDatabase(comando)
                    return
                # elif comandoL.endswith(".lcf"):
                #     self.externDatabaseFEN(comando)
                #     return
                elif comandoL.endswith(".bmt"):
                    self.inicio()
                    self.externBMT(comando)
                    return
                elif comando == "-play":
                    fen = sys.argv[2]
                    self.juegaExterno(fen)

                    return

            else:
                self.inicio()
コード例 #2
0
 def selectOneFNS(self, owner=None):
     if owner is None:
         owner = self.pantalla
     return Entrenamientos.selectOneFNS(owner, self)