From f2fbc269bb2083be7fbfac4e01a46317b7c7aecc Mon Sep 17 00:00:00 2001 From: Saba Fazlali Date: Wed, 31 Jan 2024 13:50:01 +0100 Subject: [PATCH] update mistakes --- src/main/c/Hangman/playHangman.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/c/Hangman/playHangman.c b/src/main/c/Hangman/playHangman.c index 20380e5..0fe32f7 100644 --- a/src/main/c/Hangman/playHangman.c +++ b/src/main/c/Hangman/playHangman.c @@ -41,5 +41,11 @@ void playHangman(char *wordToGuess) { } } + // Update mistakes (if the guess is wrong) + if(!found){ + mistakes++; + } + + } } \ No newline at end of file