diff --git a/JEUX_SERPENT/Jeux b/JEUX_SERPENT/Jeux index 0ef3181..15e2b5b 100755 Binary files a/JEUX_SERPENT/Jeux and b/JEUX_SERPENT/Jeux differ diff --git a/JEUX_SERPENT/main.c b/JEUX_SERPENT/main.c index 74f1ac3..256c253 100644 --- a/JEUX_SERPENT/main.c +++ b/JEUX_SERPENT/main.c @@ -43,8 +43,15 @@ int main(){ } /* fermeture de la fenĂȘtre si ECHAP pressĂ©*/ - usleep(3000000); - EcrireTexte(000,000,"Game Over", 000); + ChoisirCouleurDessin(CouleurParComposante(255,255,255)); + RemplirRectangle(0,0,1200,800); + ChoisirCouleurDessin(CouleurParComposante(0,0,0)); + EcrireTexte(500,100,"Game Over", 2); + snprintf(score,15,"Score : %04d", Nbr); + EcrireTexte(500,200,score,2); + snprintf(timer,14,"Temps : %02d:%02d", minute, seconde); + EcrireTexte(490,300,timer,2); + sleep(5); FermerGraphique(); return EXIT_SUCCESS; } \ No newline at end of file diff --git a/JEUX_SERPENT/score.c b/JEUX_SERPENT/score.c index 0040b38..944c7a5 100644 --- a/JEUX_SERPENT/score.c +++ b/JEUX_SERPENT/score.c @@ -7,7 +7,7 @@ void Score(){ Nbr=(segment-10)*10; - snprintf(score,4,"%04d0", Nbr); + snprintf(score,5,"%04d", Nbr); ChoisirCouleurDessin(CouleurParComposante(0,0,0)); RemplirRectangle(1100,730,1200,800); ChoisirCouleurDessin(CouleurParComposante(255,255,255));