ajout d'échap pour quitter
This commit is contained in:
parent
5fbd3e6376
commit
da0efe9cb0
BIN
JEUX_SERPENT/.nfs0000000002e830c500000019
Executable file
BIN
JEUX_SERPENT/.nfs0000000002e830c500000019
Executable file
Binary file not shown.
@ -10,12 +10,10 @@ int seconde_actuel=0;
|
||||
int old_seconde=0;
|
||||
char timer[6];
|
||||
unsigned long int suivant;
|
||||
|
||||
int go_on=1;
|
||||
|
||||
int serpent;
|
||||
int x = 580;
|
||||
int y = 350;
|
||||
int x = 600;
|
||||
int y = 400;
|
||||
int direction = 4; /*1 : vers le haut , 2 : vers le bas; 3 : vers la gauche, 4 : vers la droite*/
|
||||
int t;
|
||||
|
||||
@ -34,7 +32,7 @@ void DessinerScene(){
|
||||
void Update_Timer(){
|
||||
snprintf(timer,6,"%02d:%02d", minute, seconde);
|
||||
ChoisirCouleurDessin(CouleurParComposante(0,0,0));
|
||||
RemplirRectangle(0,730,1200,700);
|
||||
RemplirRectangle(0,700,1200,800);
|
||||
ChoisirCouleurDessin(CouleurParComposante(255,255,255));
|
||||
EcrireTexte(10,760,timer,2);
|
||||
|
||||
@ -82,6 +80,9 @@ void Controle(){
|
||||
break;
|
||||
case XK_Down:
|
||||
direction=2;
|
||||
break;
|
||||
case XK_Escape:
|
||||
go_on=0;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user