Browse Source

bug with single-letter-check fixed

remotes/origin/Saba
Saba Fazlali 11 months ago
parent
commit
8e35c62636
  1. BIN
      cmake-build-debug/.ninja_deps
  2. 2
      cmake-build-debug/.ninja_log
  3. 4
      cmake-build-debug/Testing/Temporary/LastTest.log
  4. 8
      src/main/c/Hangman/playHangman.c

BIN
cmake-build-debug/.ninja_deps

2
cmake-build-debug/.ninja_log

@ -33,3 +33,5 @@
0 44 1707236593330321687 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/main.c.o f1dbf76e6b4bc97d
0 45 1707236593331008028 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
45 72 1707236593357601081 pmuw_projekt_notebinder a5668107eb06d295
0 44 1707250874478682419 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
44 70 1707250874504270369 pmuw_projekt_notebinder a5668107eb06d295

4
cmake-build-debug/Testing/Temporary/LastTest.log

@ -1,3 +1,3 @@
Start testing: Feb 06 17:23 CET
Start testing: Feb 06 21:21 CET
----------------------------------------------------------
End testing: Feb 06 17:23 CET
End testing: Feb 06 21:21 CET

8
src/main/c/Hangman/playHangman.c

@ -70,14 +70,6 @@ void playHangman(char *wordToGuess) {
}
// Check if the guess is a single letter
if (strlen(&guess) != 1) {
printf("Please enter only one letter.\n");
ignoreExtraInput();
continue;
}
// Check if the letter has already been guessed by the player
if (strchr(guessedLetters, guess) != NULL) {
printf("You already guessed that letter. Try another letter.\n");

Loading…
Cancel
Save