def muestraAnalisis(procesador, xtutor, jg, siBlancas, maxRecursion, posJugada, pantalla=None, siGrabar=True): pantalla = procesador.pantalla if pantalla is None else pantalla ma = MuestraAnalisis(procesador, jg, maxRecursion, posJugada) if xtutor is None: xtutor = procesador.XTutor() um0 = ma.creaMuestraInicial(pantalla, xtutor) if not um0: return siLibre = maxRecursion > 0 wa = PantallaAnalisis.WAnalisis(ma, pantalla, siBlancas, siLibre, siGrabar, um0) wa.exec_() busca = True for uno in ma.liMuestras: if busca: if uno.siActiva: jg.analisis = uno.mrm, uno.posElegida busca = False xmotor = uno.xmotor if not xtutor or xmotor.clave != xtutor.clave: xmotor.terminar()
def show_analysis(procesador, xtutor, move, is_white, max_recursion, pos_move, main_window=None, must_save=True): main_window = procesador.main_window if main_window is None else main_window ma = MuestraAnalisis(procesador, move, max_recursion, pos_move) if xtutor is None: xtutor = procesador.XTutor() um0 = ma.create_initial_show(main_window, xtutor) if not um0: return si_libre = max_recursion > 0 wa = PantallaAnalisis.WAnalisis(ma, main_window, is_white, si_libre, must_save, um0) wa.exec_() busca = True for uno in ma.li_tabs_analysis: if busca: if uno.is_active: move.analysis = uno.mrm, uno.pos_selected busca = False xengine = uno.xengine if not xtutor or xengine.clave != xtutor.clave: xengine.terminar()