コード例 #1
0
 /* Inserto los valores de la ruta óptima. */
 public void seleccionarRutaOptima(Ficha ficha)
 {
     while (ficha != null)
     {
         this.listaCompletados.Insert(0, ficha);
         ficha = ficha.getPrevious();
     }
 }
コード例 #2
0
        /* 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);
        }