Browse Source

refactoring: level

main^2
Peter Wiebe 11 months ago
committed by Peter Wiebe
parent
commit
47151922b9
  1. 10
      src/main/c/hangman.c

10
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 {

Loading…
Cancel
Save