コード例 #1
0
ファイル: bookPanel.py プロジェクト: scchess/pychess
    def __init__(self, store, tv, boardview):
        Advisor.__init__(self, store, _("Endgame Table"), ENDGAME)
        self.egtb = EndgameTable()
        # If mate in # was activated by double click let egtb do the rest
        self.auto_activate = False
        self.tv = tv
        self.boardview = boardview
        self.tooltip = _(
            "The endgame table will show exact analysis when there are few pieces on the board.")
        # TODO: Show a message if tablebases for the position exist but are neither installed nor allowed.

        self.queue = asyncio.Queue()
        self.egtb_task = asyncio.async(self.start())
コード例 #2
0
    def __init__ (self, store, tv, boardview):
        Thread.__init__(self, name=fident(self.run))
        self.daemon = True
        # FIXME 'Advisor.name = ...' in Advisor.__init__ overwrites Thread.name
        Advisor.__init__(self, store, _("Endgame Table"), ENDGAME)
        self.egtb = EndgameTable()
        self.tv = tv
        self.boardview = boardview
        self.tooltip = _("The endgame table will show exact analysis when there are few pieces on the board.")
        # TODO: Show a message if tablebases for the position exist but are neither installed nor allowed.

        self.egtb.connect("scored", self.on_scored)
        self.queue = Queue()
        self.start()
コード例 #3
0
ファイル: bookPanel.py プロジェクト: well69/pychess
    def __init__(self, store, tv, boardcontrol):
        Advisor.__init__(self, store, _("Endgame Table"), ENDGAME)
        # deferred import to not slow down PyChess starting up
        from pychess.Utils.EndgameTable import EndgameTable
        self.egtb = EndgameTable()
        # If mate in # was activated by double click let egtb do the rest
        self.auto_activate = False
        self.tv = tv
        self.boardcontrol = boardcontrol
        self.boardview = boardcontrol.view
        self.tooltip = _(
            "The endgame table will show exact analysis when there are few pieces on the board.")
        # TODO: Show a message if tablebases for the position exist but are neither installed nor allowed.

        self.queue = asyncio.Queue()
        self.egtb_task = create_task(self.start())