Browse Source

Commit 19 - eingabe eines Buchstaben in die func Hauptspiel soll ermöglicht werden

remotes/origin/peter^2
Peter Wiebe 11 months ago
parent
commit
82b77097a0
  1. 8
      src/main/c/hangman.c

8
src/main/c/hangman.c

@ -16,6 +16,7 @@ void levelauswahl();
void hauptSpiel(int level);
void draw_hangman(int attempts);
void add_guessed_letter(char* guessed_letters, char guessed_letter);
char eingabe_buchstabe();
void protokoll(){
clear_screen();
@ -261,3 +262,10 @@ void add_guessed_letter(char* guessed_letters, char guessed_letter){
guessed_letters[strlen(guessed_letters)] = guessed_letter;
guessed_letters[strlen(guessed_letters) + 1] = '\0';
}
char eingabe_buchstabe(){
char guess;
scanf(" %c", &guess);
guess = tolower(guess);
return guess;
}
Loading…
Cancel
Save