ajout du meilleure score

This commit is contained in:
2023-12-22 17:23:26 +01:00
parent 887caed239
commit b57b441d63
4 changed files with 31 additions and 12 deletions

12
main.c
View File

@@ -14,6 +14,7 @@ int main()
{
unsigned char pause = 0;
unsigned long score = 0;
unsigned long bestscore = 0;
unsigned long suivant;
unsigned long suivant2;
int game_on=0;
@@ -48,8 +49,11 @@ int main()
while(window_on)
{
if(perdu == 1)
{
PerduGUI();
{ if(score>bestscore)
{
bestscore=score;
}
PerduGUI(&bestscore);
if (ToucheEnAttente() == 1)
{
switch (Touche())
@@ -62,7 +66,7 @@ int main()
}
else
{
Menu();
Menu(&bestscore);
if (ToucheEnAttente() == 1)
{
switch (Touche())
@@ -145,7 +149,7 @@ int main()
if(pause==1)
{
Pause();
Pause(&bestscore);
}
}