From 47151922b976e6440d617aee3d6a6f0c17891ede Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 10:05:23 +0100 Subject: [PATCH] refactoring: level --- src/main/c/hangman.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/c/hangman.c b/src/main/c/hangman.c index 7ec5e3f..5c0f15f 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -350,7 +350,7 @@ int gewonnen(char secret_word[100], char guessed_letters[100]){ void level_plus(){ char KonfDatei[100]; - char levelstr[3]; + char level[3]; int i = 0; FILE *fp = NULL; @@ -360,10 +360,10 @@ void level_plus(){ while(KonfDatei[i] != 0){ i++; } - levelstr[0] = KonfDatei[i-2]; - levelstr[1] = KonfDatei[i-1]; - levelstr[2] = '\0'; - if (levelstr[1] == '9'){ + level[0] = KonfDatei[i-2]; + level[1] = KonfDatei[i-1]; + level[2] = '\0'; + if (level[1] == '9'){ KonfDatei[i-2]++; KonfDatei[i-1] = '0'; } else {