From a5d14c504dcc7e7243ace77d8714f67aec12862c Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Thu, 25 Jan 2024 21:15:54 +0100 Subject: [PATCH] =?UTF-8?q?refactoring:=20Umbenennen=20der=20formalen=20Pa?= =?UTF-8?q?rameter=20von=20drawHangman=20und=20noTrysLeft=20zu=20verst?= =?UTF-8?q?=C3=A4ndlicheren=20Namen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/Tim/hangman.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/c/Tim/hangman.c b/src/main/c/Tim/hangman.c index 228d02a..08886d6 100644 --- a/src/main/c/Tim/hangman.c +++ b/src/main/c/Tim/hangman.c @@ -227,16 +227,16 @@ void changeLetter(char selectedLetter, char guessWord[], int length, char ptrDis } } -void drawHangman(int x) +void drawHangman(int wrongGuessCount) { - printf("%s", hangmanStages[x]); + printf("%s", hangmanStages[wrongGuessCount]); } -bool noTrysLeft(int x, char y[]) +bool noTrysLeft(int wrongGuessCount, char guessWord[]) { - if(x >= POSSIBLE_TRYS) + if(wrongGuessCount >= POSSIBLE_TRYS) { - printf("Du hast verloren!\n\nDas gesuchte Wort war \"%s\"\n\n",y); + printf("Du hast verloren!\n\nDas gesuchte Wort war \"%s\"\n\n", guessWord); return true; } else