From 64baba6c617f7f17125569e4246e08b884873fe3 Mon Sep 17 00:00:00 2001 From: schied Date: Wed, 23 Oct 2024 21:32:59 +0200 Subject: [PATCH] Fix merge --- pendu.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/pendu.c b/pendu.c index dbde74c..f0602ef 100644 --- a/pendu.c +++ b/pendu.c @@ -37,10 +37,6 @@ void display_hangman(int tries) { } } -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD /* this function allow to save the last party @@ -72,25 +68,15 @@ void save_party(char * status, const char * good_word, char try[]) { fputs("\n",fichier); fputs("tried letters: ", fichier); - for (int i = 0; i < sizeof(try); i++) { + for (int i = 0; i < sizeof(char*); i++) { fputc(try[i],fichier); } fputs("\n",fichier); fclose(fichier); // On ferme le fichier qui a été ouvert } +} -======= -<<<<<<< HEAD -======= -void sig_handler(int signum){ - printf("\ntime out\n"); - exit (1); ->>>>>>> b4f25a5 (ajout du cooldown sur le scanf) -======= -======= ->>>>>>> dev-rocherl ->>>>>>> 083b1f2 (Commentaires) /* this function display time out when user does nothing during 30s and verify signal*/ void sig_handler(int signum){ if (signum == SIGALRM){ @@ -98,11 +84,8 @@ void sig_handler(int signum){ printf("\ntime out\n"); exit (1); } -<<<<<<< HEAD ->>>>>>> 83066e1 (ajout des commentaires.) -======= ->>>>>>> dev-rocherl -======= +} + /* getWordByLength() function adds the possibility to the user to choose how many letters maximum the word to guess can contains. @@ -137,7 +120,6 @@ const char* getWordByLength(){ word = (const char*) strcat((char *) word, newWords[rand() % wordsFound]); }*/ return word; ->>>>>>> dev-schied } int main() {