Exemplo n.º 1
0
    def turn_on_lights(self, name):
        if name.startswith("uned_easy"):
            title = "%s (%s)" % (_("UNED chess school"), _("Initial"))
            folder = "Trainings/Tactics by UNED chess school"
            icono = Iconos.Uned()
            li_tam_blocks = (4, 6, 9, 12, 18, 36)
        elif name.startswith("uned"):
            title = _("UNED chess school")
            folder = "Trainings/Tactics by UNED chess school"
            icono = Iconos.Uned()
            li_tam_blocks = (6, 12, 20, 30, 60)
        elif name.startswith("uwe_easy"):
            title = "%s (%s)" % (_("Uwe Auerswald"), _("Initial"))
            TurnOnLights.compruebaUweEasy(self.configuracion, name)
            folder = self.configuracion.carpetaTemporal()
            icono = Iconos.Uwe()
            li_tam_blocks = (4, 6, 9, 12, 18, 36)
        elif name.startswith("uwe"):
            title = _("Uwe Auerswald")
            folder = "Trainings/Tactics by Uwe Auerswald"
            icono = Iconos.Uwe()
            li_tam_blocks = (5, 10, 20, 40, 80)

        resp = PantallaTurnOnLights.pantallaTurnOnLigths(
            self.procesador, name, title, icono, folder, li_tam_blocks)
        if resp:
            num_theme, num_block, tol = resp
            self.procesador.tipoJuego = kJugEntLight
            self.procesador.estado = kJugando
            self.procesador.gestor = GestorTurnOnLights.GestorTurnOnLights(
                self.procesador)
            self.procesador.gestor.inicio(num_theme, num_block, tol)
Exemplo n.º 2
0
 def rebuild(self):
     if not QTUtil2.pregunta(self, _(
             "Are you sure you want to delete all results of all levels and start again from scratch?")):
         return
     if self.one_line:
         self.tol.new()
     else:
         TurnOnLights.remove_tol(self.tol)
         if self.tol.name.startswith("uwe_easy"):
             TurnOnLights.compruebaUweEasy(self.procesador.configuracion, self.tol.name)
     self.reinit = True
     self.guardarVideo()
     self.accept()
Exemplo n.º 3
0
    def turn_on_lights(self, name):
        one_line = False
        if name.startswith("uned_easy"):
            title = "%s (%s)" % (_("UNED chess school"), _("Initial"))
            folder = Code.path_resource("Trainings",
                                        "Tactics by UNED chess school")
            icono = Iconos.Uned()
            li_tam_blocks = (4, 6, 9, 12, 18, 36)
        elif name.startswith("uned"):
            title = _("UNED chess school")
            folder = Code.path_resource("Trainings",
                                        "Tactics by UNED chess school")
            icono = Iconos.Uned()
            li_tam_blocks = (6, 12, 20, 30, 60)
        elif name.startswith("uwe_easy"):
            title = "%s (%s)" % (_("Uwe Auerswald"), _("Initial"))
            TurnOnLights.compruebaUweEasy(self.configuracion, name)
            folder = self.configuracion.carpetaTemporal()
            icono = Iconos.Uwe()
            li_tam_blocks = (4, 6, 9, 12, 18, 36)
        elif name.startswith("uwe"):
            title = _("Uwe Auerswald")
            folder = Code.path_resource("Trainings",
                                        "Tactics by Uwe Auerswald")
            icono = Iconos.Uwe()
            li_tam_blocks = (5, 10, 20, 40, 80)
        elif name == "oneline":
            title = _("In one line")
            folder = None
            icono = Iconos.TOLline()
            li_tam_blocks = None
            one_line = True

        resp = PantallaTurnOnLights.pantallaTurnOnLigths(
            self.procesador, name, title, icono, folder, li_tam_blocks,
            one_line)
        if resp:
            num_theme, num_block, tol = resp
            self.procesador.game_type = GT_TURN_ON_LIGHTS
            self.procesador.state = ST_PLAYING
            self.procesador.gestor = GestorTurnOnLights.GestorTurnOnLights(
                self.procesador)
            self.procesador.gestor.inicio(num_theme, num_block, tol)