Browse Source

refactoring: Umbenennen der formalen Parameter von drawHangman und noTrysLeft zu verständlicheren Namen

remotes/origin/tim
fdai7727 11 months ago
parent
commit
a5d14c504d
  1. 10
      src/main/c/Tim/hangman.c

10
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

Loading…
Cancel
Save