elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


  Mostrar Mensajes
Páginas: [1]
1  Programación / Programación C/C++ / Re: AYUDA CON RECURSIVIDAD en: 9 Enero 2018, 01:41 am
He intentado solucionar tu problema pero me he atascado en lo mismo que tú, aunque no este solucionado, te pongo el código que he creado por si te puede servir de algo.
Código:
int i,j;

Partida[fil][col].visible=true;
for (i=-1; i<2; i++)
for (j=-1; j<2; j++)
if (((fil+i>=0)&&(fil+i<FIL))&&((col+j>=0)&&(col+j<COL)))
if (Partida[fil][col].visible == true)

                                   /* si la casilla tampoco tiene adyacentes se hace una llamada
recursiva */
if (Partida[fil][col].visible == false&&Partida[fil][col].num==0){
FncOpenPoint(Partida,fil+i,col+j);
}
else
Partida[fil][col].visible=true;

Partida[fil+i][col+j].visible = true;
}
}
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines