Browse Source

refactoring: level

remotes/origin/peter^2
Peter Wiebe 11 months ago
parent
commit
34e44fbcbd
  1. 10
      src/main/c/hangman.c

10
src/main/c/hangman.c

@ -351,7 +351,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;
@ -361,10 +361,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