Esempio n. 1
0
 def help_to_move(self):
     if not self.is_finished():
         move = Move.Move(self.game, position_before=self.game.last_position.copia())
         if self.is_tutor_enabled:
             self.analizaFinal()
             move.analysis = self.mrmTutor, 0
         Analysis.show_analysis(self.procesador, self.xtutor, move, self.board.is_white_bottom, 999, 0, must_save=False)
Esempio n. 2
0
    def analizar(self, position):

        move = self.li_analysis[position]
        is_white = move.position_before.is_white
        Analysis.show_analysis(
            self.procesador, self.xtutor, move, is_white, 9999999, 1, main_window=self, must_save=False
        )
Esempio n. 3
0
    def grid_doble_click(self, grid, row, o_column):
        game = self.gameActual()
        if game is not None:
            self.procesador.cambiaXAnalyzer()
            xanalyzer = self.procesador.xanalyzer
            move = game.move(-1)
            fenm2 = move.position_before.fenm2()
            dic = self.dbop.getfenvalue(fenm2)
            if "ANALISIS" in dic:
                mrm = dic["ANALISIS"]
                move.analysis = mrm, 0
            else:
                me = QTUtil2.mensEspera.start(self,
                                              _("Analyzing the move...."),
                                              physical_pos="ad")

                move.analysis = xanalyzer.analizaJugadaPartida(
                    game,
                    len(game) - 1, xanalyzer.mstime_engine,
                    xanalyzer.depth_engine)
                me.final()
            Analysis.show_analysis(self.procesador,
                                   xanalyzer,
                                   move,
                                   self.pboard.board.is_white_bottom,
                                   9999,
                                   len(game) - 1,
                                   main_window=self)

            dic = self.dbop.getfenvalue(fenm2)
            dic["ANALISIS"] = move.analysis[0]
            self.dbop.setfenvalue(fenm2, dic)
Esempio n. 4
0
 def analizar(self):
     Analysis.show_analysis(self.procesador,
                            self.xtutor,
                            self.move,
                            self.position.is_white,
                            9999999,
                            1,
                            main_window=self,
                            must_save=False)
Esempio n. 5
0
    def analizaPosicion(self, row, key):
        if row < 0:
            return

        move, is_white, siUltimo, tam_lj, pos = self.dameJugadaEn(row, key)
        if not move:
            return

        max_recursion = 9999

        if not (hasattr(move, "analysis") and move.analysis):
            me = QTUtil2.mensEspera.start(self.main_window, _("Analyzing the move...."), physical_pos="ad")
            mrm, pos = self.xanalyzer.analysis_move(move, self.xanalyzer.mstime_engine, self.xanalyzer.depth_engine)
            move.analysis = mrm, pos
            me.final()

        Analysis.show_analysis(self.procesador, self.xanalyzer, move, self.board.is_white_bottom, max_recursion, pos)
        self.put_view()
Esempio n. 6
0
    def analiza(self, quien):
        if quien == "Tutor":
            rmTutor = self.list_rm[self.pos_rm][0]
            move = self.game_tutor.move(self.pos_tutor)
            pts = rmTutor.texto()
        else:
            move = self.gameUsuario.move(self.posUsuario)
            pts = self.rmUsuario.texto()

        Analysis.AnalisisVariations(self.w, self.manager.xtutor, move,
                                    self.is_white, pts)
Esempio n. 7
0
 def mueveLibre(self):
     move = self.game.move(self.posMueve)
     pts = self.list_rm[self.grid.recno()].rm.texto()
     Analysis.AnalisisVariations(self, self.xengine, move,
                                 self.position.is_white, pts)