marche po

This commit is contained in:
proal 2022-11-29 23:02:28 +01:00
parent c24f4a9446
commit 5cfabcdbbf

View File

@ -3,6 +3,7 @@
#include <graph.h> #include <graph.h>
#include <time.h> #include <time.h>
#include "images.h" #include "images.h"
#include <unistd.h>
int tirage_aleatoire(void){ int tirage_aleatoire(void){
InitialiserGraphique(); InitialiserGraphique();
@ -14,7 +15,7 @@ int tirage_aleatoire(void){
int nb_paires=20; int nb_paires=20;
int positions[20][4]; int positions[20][4];
int repet; int repet;
char comparer[2]; char* comparer[2];
ChargerImage("Images/background.png",0,0,0,0,1024,576); ChargerImage("Images/background.png",0,0,0,0,1024,576);
@ -125,10 +126,15 @@ int tirage_aleatoire(void){
} }
} }
if (comparer[0]==comparer[1]){ if (comparer[0]==comparer[1]){
score++ score++;
} }
if (score!=20){ if (score!=20){
sleep(1);
for (pos_y=10;pos_y<=370;pos_y=pos_y+90){
for (pos_x=10;pos_x<=640;pos_x=pos_x+90){
ChargerImage("Images/image0.png",pos_x,pos_y,0,0,80,80);
}
}
} }
} }
Touche(); Touche();