Browse Source

win/lose message added

remotes/origin/Saba
Saba Fazlali 11 months ago
parent
commit
3ff2b71e3f
  1. 2
      CMakeLists.txt
  2. BIN
      cmake-build-debug/.ninja_deps
  3. 11
      cmake-build-debug/.ninja_log
  4. 4
      cmake-build-debug/Testing/Temporary/LastTest.log
  5. 9
      cmake-build-debug/build.ninja
  6. 16
      src/main/c/Hangman/drawHangman.c
  7. 9
      src/main/c/Hangman/playHangman.c

2
CMakeLists.txt

@ -25,4 +25,6 @@ add_executable(pmuw_projekt_notebinder
src/main/c/Hangman/playHangman.h
src/main/c/Hangman/Test/test_drawHangman.c
src/main/c/Hangman/Test/test_drawHangman.h
src/main/c/Hangman/Test/test_currentState.c
src/main/c/Hangman/Test/test_currentState.h
)

BIN
cmake-build-debug/.ninja_deps

11
cmake-build-debug/.ninja_log

@ -1,14 +1,13 @@
# ninja log v5
1 38 1706122217155672196 CMakeFiles/pmuw_projekt_notebinder.dir/test/Hangman/word_selector_test.c.o e932f546d59a9d76
2 56 1706797998885305995 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
0 40 1706865968377952833 build.ninja f2183aada2fc9ffc
1 38 1706122372717341436 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/main.c.o f1dbf76e6b4bc97d
0 40 1706867178156302406 build.ninja f2183aada2fc9ffc
1 214 1706706276607374928 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/rules.c.o cdaff7b94c55641c
0 213 1706706276607336012 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/word_selector.c.o fab41de4b8cc0421
1 214 1706706276607365429 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/initializeHangman.c.o 7d64de4520ec9e97
1 43 1706797998872539655 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/drawHangman.c.o de5f7edc6c2379d7
1 44 1706122039878920765 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Template/game100.c.o 69a5bcd8c57a43b3
1 38 1706122217155672196 CMakeFiles/pmuw_projekt_notebinder.dir/test/Hangman/word_selector_test.c.o e932f546d59a9d76
106 195 1706551302079685763 pmuw_projekt_notebinder fbb48fd3bf0b96c1
1 214 1706706276607356095 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/currentState.c.o c4eef1ff589ab182
1 114 1706866005935734705 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHangman.c.o b4d90a6b54ad1664
1 38 1706122372717341436 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/main.c.o f1dbf76e6b4bc97d
2 56 1706797998885305995 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
1 115 1706866005935735539 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/currentState.c.o c4eef1ff589ab182
1 114 1706866005935734705 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHangman.c.o b4d90a6b54ad1664

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

@ -1,3 +1,3 @@
Start testing: Feb 02 10:26 CET
Start testing: Feb 02 10:46 CET
----------------------------------------------------------
End testing: Feb 02 10:26 CET
End testing: Feb 02 10:46 CET

9
cmake-build-debug/build.ninja

@ -105,6 +105,13 @@ build CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHa
OBJECT_DIR = CMakeFiles/pmuw_projekt_notebinder.dir
OBJECT_FILE_DIR = CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test
build CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_currentState.c.o: C_COMPILER__pmuw_projekt_notebinder_unscanned_Debug /Users/saba/CLionProjects/pmuw_projekt_notebinder/src/main/c/Hangman/Test/test_currentState.c || cmake_object_order_depends_target_pmuw_projekt_notebinder
DEP_FILE = CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_currentState.c.o.d
FLAGS = -g -std=gnu11 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk -fcolor-diagnostics
INCLUDES = -I/Users/saba/CLionProjects/pmuw_projekt_notebinder/src/main/c -I/Users/saba/CLionProjects/pmuw_projekt_notebinder/src/main/c/Hangman -I/Users/saba/CLionProjects/pmuw_projekt_notebinder/src/main/c/Template
OBJECT_DIR = CMakeFiles/pmuw_projekt_notebinder.dir
OBJECT_FILE_DIR = CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test
# =============================================================================
# Link build statements for EXECUTABLE target pmuw_projekt_notebinder
@ -113,7 +120,7 @@ build CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHa
#############################################
# Link the executable pmuw_projekt_notebinder
build pmuw_projekt_notebinder: C_EXECUTABLE_LINKER__pmuw_projekt_notebinder_Debug CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/word_selector.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/main.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/drawHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/rules.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/initializeHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/currentState.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHangman.c.o
build pmuw_projekt_notebinder: C_EXECUTABLE_LINKER__pmuw_projekt_notebinder_Debug CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/word_selector.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/main.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/drawHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/rules.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/initializeHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/currentState.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHangman.c.o CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_currentState.c.o
FLAGS = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk
OBJECT_DIR = CMakeFiles/pmuw_projekt_notebinder.dir
POST_BUILD = :

16
src/main/c/Hangman/drawHangman.c

@ -73,12 +73,14 @@ void drawHangman(int incorrectGuesses) {
}
if (incorrectGuesses >= 6) {
printf(" \n");
printf(" __ _ __ _ _ __ ___ ___ _____ _____ _ __ \n");
printf(" / _` |/ _` | '_ ` _ \\ / _ \\ / _ \\ \\ / / _ \\ '__|\n");
printf(" | (_| | (_| | | | | | | __/ | (_) \\ V / __/ | \n");
printf(" \\__, |\\__,_|_| |_| |_|\\___| \\___/ \\_/ \\___|_| \n");
printf(" |___/ \n");
printf("\n"
" _____ ____ \n"
" / ____| / __ \\ \n"
" | | __ __ _ _ __ ___ ___ | | | |_ _____ _ __ \n"
" | | |_ |/ _` | '_ ` _ \\ / _ \\ | | | \\ \\ / / _ \\ '__| \n"
" | |__| | (_| | | | | | | __/ | |__| |\\ V / __/ | \n"
" \\_____|\\__,_|_| |_| |_|\\___| \\____/ \\_/ \\___|_| \n"
" \n"
" \n");
}
}

9
src/main/c/Hangman/playHangman.c

@ -51,6 +51,15 @@ void playHangman(char *wordToGuess) {
if (strcmp(currentGuess, wordToGuess) == 0) {
currentState(currentGuess, mistakes);
printf("Bravo! You guessed the word: %s \n", wordToGuess);
printf("\n"
" __ __ _ _ _ _ \n"
" \\ \\ / / | | | | (_) | |\n"
" \\ \\_/ /__ _ _ __ _ _ __ ___ | |_| |__ ___ __ ___ _ __ _ __ ___ _ __| |\n"
" \\ / _ \\| | | | / _` | '__/ _ \\ | __| '_ \\ / _ \\ \\ \\ /\\ / / | '_ \\| '_ \\ / _ \\ '__| |\n"
" | | (_) | |_| | | (_| | | | __/ | |_| | | | __/ \\ V V /| | | | | | | | __/ | |_|\n"
" |_|\\___/ \\__,_| \\__,_|_| \\___| \\__|_| |_|\\___| \\_/\\_/ |_|_| |_|_| |_|\\___|_| (_)\n"
" \n"
" ");
break;
}

Loading…
Cancel
Save