affichage score

This commit is contained in:
2024-12-30 13:20:40 +01:00
parent 18399f735c
commit 97cbf06748
3 changed files with 27 additions and 3 deletions

View File

@@ -57,6 +57,7 @@ int main ()
}
else
{
score_user.before = time(NULL);
char txt[30] = "";
if(output <= 3)
{
@@ -72,7 +73,8 @@ int main ()
targets = fileToTab2D(txt, tab2d, SIZE_PLAY, playerPos, &nbr_targets);
output = inGameLoop(tab2d, &dim, playerPos, targets, nbr_targets, &display_user, &score_user, false);
SDL_RenderClear(display_user.renderer);
if(output != -1000) winOrLoseLoop(&display_user, output==1);
score_user.after = time(NULL);
if(output != -1000) winOrLoseLoop(&display_user, &score_user, output==1);
output = -1;
}
}