diff --git a/jeu.c b/jeu.c index 6b9cb34..ddd6b55 100644 --- a/jeu.c +++ b/jeu.c @@ -13,9 +13,8 @@ int jeu(int position[20][4], int nb_paires){ int repet2, nb_images; int clic_x,clic_y,im_y,im_x; unsigned long temps, temps2,temps3; - char tempstab[50],affichage[50];; - char* comparer1[50], comparer2[50]; - int tab[3]; + char tempstab[50],affichage[50]; + int tab[3], ban_list[20]; couleur c=CouleurParComposante(0,0,0); temps2=Microsecondes(); @@ -80,14 +79,14 @@ int jeu(int position[20][4], int nb_paires){ if (position[i][(j*2)]==im_x && position[i][(j*2+1)]==im_y){ if (repet==0){ g=i+1; - snprintf(comparer1,50,"Images/image%d.png",g); - ChargerImage(comparer1,im_x,im_y,0,0,80,80); + snprintf(affichage,50,"Images/image%d.png",g); + ChargerImage(affichage,im_x,im_y,0,0,80,80); stock_g_1=g; } else{ g=i+1; - snprintf(comparer2,50,"Images/image%d.png",g); - ChargerImage(comparer2,im_x,im_y,0,0,80,80); + snprintf(affichage,50,"Images/image%d.png",g); + ChargerImage(affichage,im_x,im_y,0,0,80,80); stock_g_2=g; } repet++; @@ -101,6 +100,10 @@ int jeu(int position[20][4], int nb_paires){ printf("%d\n", im_y);*/ if (stock_g_1==stock_g_2){ score++; + position[stock_g_1-1][0]=0; + position[stock_g_1-1][1]=0; + position[stock_g_1-1][2]=0; + position[stock_g_1-1][3]=0; } repet2=0; if (score!=nb_paires){ @@ -117,7 +120,6 @@ int jeu(int position[20][4], int nb_paires){ } } } - Touche(); FermerGraphique(); return 1; } \ No newline at end of file