1
0

ajout-difficulte #4

Merged
Hugo DIMITRIJEVIC merged 3 commits from ajout-difficulte into master 2024-10-26 18:26:23 +02:00
Showing only changes of commit 227f77d89d - Show all commits

View File

@ -109,11 +109,11 @@ int play_game(const char *word, int word_length) {
char guess;
alarm(30);
printf("Entrez une lettre (ou 'q' pour quitter) : ");
printf("Entrez une lettre (ou '1' pour quitter) : ");
scanf(" %c", &guess);
alarm(0);
if (guess == 'q') {
if (guess == '1') {
printf("Vous avez quitté le jeu. À bientôt !\n");
return 0;
}
@ -167,7 +167,7 @@ int main() {
char word[256] = "";
choose_random_words(filtered_words, num_filtered_words, word, max_word_length);
int word_length = strlen(word);
printf("%s",word)
printf("%s",word);
int score = play_game(word, word_length);
char play_again;