correction de quelques bugs
This commit is contained in:
parent
4f6efa071c
commit
d3317aad15
7
jeu.c
7
jeu.c
@ -21,7 +21,8 @@ int jeu(int position[20][4], int nb_paires,int tab[40]){
|
|||||||
printf("Voici le nombre de paires: %d\n", nb_paires);
|
printf("Voici le nombre de paires: %d\n", nb_paires);
|
||||||
nb_images=nb_paires*2;
|
nb_images=nb_paires*2;
|
||||||
score=0;
|
score=0;
|
||||||
c=CouleurParComposante(255,255,255); ChoisirCouleurDessin(c);
|
c=CouleurParComposante(255,255,255);
|
||||||
|
ChoisirCouleurDessin(c);
|
||||||
RemplirRectangle(850,320,50,50);
|
RemplirRectangle(850,320,50,50);
|
||||||
snprintf(scoretab,50,"%d",score);
|
snprintf(scoretab,50,"%d",score);
|
||||||
c=CouleurParComposante(0,0,0);
|
c=CouleurParComposante(0,0,0);
|
||||||
@ -127,7 +128,7 @@ int jeu(int position[20][4], int nb_paires,int tab[40]){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (im_x!=0 && im_y!=0 && im_x_1!=im_x_2 && im_y_1!=im_y_2){
|
if (im_x!=0 && im_y!=0 && (im_x_1!=im_x_2 || im_y_1!=im_y_2)){
|
||||||
for (i=0;i<20;i++){
|
for (i=0;i<20;i++){
|
||||||
for (j=0;j<2;j++){
|
for (j=0;j<2;j++){
|
||||||
if (position[i][(j*2)]==im_x && position[i][(j*2+1)]==im_y){
|
if (position[i][(j*2)]==im_x && position[i][(j*2+1)]==im_y){
|
||||||
@ -168,7 +169,9 @@ int jeu(int position[20][4], int nb_paires,int tab[40]){
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
for (pos_y=10;pos_y<=370;pos_y=pos_y+90){
|
for (pos_y=10;pos_y<=370;pos_y=pos_y+90){
|
||||||
for (pos_x=10;pos_x<=640;pos_x=pos_x+90){
|
for (pos_x=10;pos_x<=640;pos_x=pos_x+90){
|
||||||
|
if (position)
|
||||||
ChargerImage("Images/image0.png",pos_x,pos_y,0,0,80,80);
|
ChargerImage("Images/image0.png",pos_x,pos_y,0,0,80,80);
|
||||||
|
|
||||||
repet2++;
|
repet2++;
|
||||||
if (repet2==nb_images){
|
if (repet2==nb_images){
|
||||||
pos_x=750;
|
pos_x=750;
|
||||||
|
Loading…
Reference in New Issue
Block a user