/* Inserto los valores de la ruta óptima. */ public void seleccionarRutaOptima(Ficha ficha) { while (ficha != null) { this.listaCompletados.Insert(0, ficha); ficha = ficha.getPrevious(); } }
/* Revise si ya había hecho ese movimiento previamente. */ public Boolean compararPrevios(Ficha posActual, Ficha nuevoHijo) { Ficha temp = posActual.getPrevious(); while (temp != null) { if (temp.compararFicha(nuevoHijo)) { return(true); } temp = temp.getPrevious(); } return(false); }