From 5b256f172b9f38f38163369a84aef48983e02ce1 Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Thu, 25 Jan 2024 20:37:18 +0100 Subject: [PATCH] =?UTF-8?q?Hinzuf=C3=BCgen,=20dass=20der=20Hangman=20bei?= =?UTF-8?q?=20falschen=20Raten=20erweitert=20wird?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/Tim/hangman.c | 14 ++++++++------ src/main/c/Tim/hangman.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/c/Tim/hangman.c b/src/main/c/Tim/hangman.c index 7db0052..799ceba 100644 --- a/src/main/c/Tim/hangman.c +++ b/src/main/c/Tim/hangman.c @@ -84,11 +84,13 @@ void hangman() { char guessWord[MAX_WORD_LENGTH]; int length; + int countWrongGuess=0; strcpy(guessWord,getWordFromList(rand() % LISTSIZE)); length = strlen(guessWord); printf("%s %d\n",guessWord, length); char displayWord[MAX_WORD_LENGTH]; + drawHangman(countWrongGuess); for (int i = 0; i <= length; i++) { if(i