Exemple #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)
Exemple #2
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)
    def turn_on_lights(self, name):
        if name == "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 == "uwe":
            title = _("Uwe Auerswald")
            folder = "Trainings/Tactics by Uwe Auerswald"
            icono = Iconos.Uwe()
            li_tam_blocks = (6, 10, 15, 30, 45, 90)
            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)