Beispiel #1
0
    def creaListaSonidos(self):

        self.liSonidos = [["MC", _("After rival move"), None]]

        # self.liSonidos.append( [ None, "", None ] )
        self.liSonidos.append([None, "- " + _("Results") + " -", None])

        d = collections.OrderedDict()
        d["GANAMOS"] = _("You win")
        d["GANARIVAL"] = _("Opponent wins")
        d["TABLAS"] = _("Stalemate")
        d["TABLASREPETICION"] = _("Draw due to three times repetition")
        d["TABLAS50"] = _("Draw according to the 50 move rule")
        d["TABLASFALTAMATERIAL"] = _("Draw, not enough material")
        d["GANAMOSTIEMPO"] = _("You win on time")
        d["GANARIVALTIEMPO"] = _("Opponent has won on time")

        for c, tr in d.items():
            self.liSonidos.append([c, tr, None])

        # self.liSonidos.append( [ None, "", None ] )
        self.liSonidos.append([None, "- " + _("Rival moves") + " -", None])

        for c in "abcdefgh12345678":
            self.liSonidos.append([c, c, None])

        for c in "KQRBNP":
            t = TrListas.letterPiece(c)
            self.liSonidos.append([c, t, None])

        for c in ("O-O", "O-O-O", "=", "x", "#", "+"):
            self.liSonidos.append([c, c, None])

        self.liSonidos.append([None, "", None])
        self.liSonidos.append(["ZEITNOT", _("Zeitnot"), None])
Beispiel #2
0
 def tr_pgn(self):
     p = ""
     pzs = "KQRBNPkqrbnp"
     pgn = self.pgn
     for n, c in enumerate(pgn):
         if c in pzs and not pgn[n + 1].isdigit():
             c = TrListas.letterPiece(c)
         p += c
     return p