diff --git a/CMakeLists.txt b/CMakeLists.txt index 1856cfe..763f8e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,4 +23,6 @@ add_executable(pmuw_projekt_notebinder src/main/c/Hangman/currentState.h src/main/c/Hangman/playHangman.c src/main/c/Hangman/playHangman.h + src/main/c/Hangman/Test/test_drawHangman.c + src/main/c/Hangman/Test/test_drawHangman.h ) diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps index b396b92..3b1c1d1 100644 Binary files a/cmake-build-debug/.ninja_deps and b/cmake-build-debug/.ninja_deps differ diff --git a/cmake-build-debug/.ninja_log b/cmake-build-debug/.ninja_log index 5f3acae..5be403a 100644 --- a/cmake-build-debug/.ninja_log +++ b/cmake-build-debug/.ninja_log @@ -1,17 +1,14 @@ # ninja log v5 1 38 1706122217155672196 CMakeFiles/pmuw_projekt_notebinder.dir/test/Hangman/word_selector_test.c.o e932f546d59a9d76 -0 40 1706703919580754893 build.ninja f2183aada2fc9ffc +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 106 1706551301992128657 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/rules.c.o cdaff7b94c55641c -1 145 1706549408123039155 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/word_selector.c.o fab41de4b8cc0421 -0 106 1706551301992114407 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 -106 195 1706551302079685763 pmuw_projekt_notebinder fbb48fd3bf0b96c1 -0 213 1706706276607336012 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/word_selector.c.o fab41de4b8cc0421 -1 214 1706706276607356095 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/currentState.c.o c4eef1ff589ab182 -1 214 1706706276608460832 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6 -1 214 1706706276607344137 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/drawHangman.c.o de5f7edc6c2379d7 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 -2 56 1706797998885305995 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6 +1 44 1706122039878920765 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Template/game100.c.o 69a5bcd8c57a43b3 +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 115 1706866005935735539 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/currentState.c.o c4eef1ff589ab182 diff --git a/cmake-build-debug/Testing/Temporary/LastTest.log b/cmake-build-debug/Testing/Temporary/LastTest.log index 4dbb2b2..b9be6e3 100644 --- a/cmake-build-debug/Testing/Temporary/LastTest.log +++ b/cmake-build-debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Feb 01 15:14 CET +Start testing: Feb 02 10:26 CET ---------------------------------------------------------- -End testing: Feb 01 15:14 CET +End testing: Feb 02 10:26 CET diff --git a/cmake-build-debug/build.ninja b/cmake-build-debug/build.ninja index 8c168ac..d97c4a5 100644 --- a/cmake-build-debug/build.ninja +++ b/cmake-build-debug/build.ninja @@ -98,6 +98,13 @@ build CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o: OBJECT_DIR = CMakeFiles/pmuw_projekt_notebinder.dir OBJECT_FILE_DIR = CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman +build CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHangman.c.o: C_COMPILER__pmuw_projekt_notebinder_unscanned_Debug /Users/saba/CLionProjects/pmuw_projekt_notebinder/src/main/c/Hangman/Test/test_drawHangman.c || cmake_object_order_depends_target_pmuw_projekt_notebinder + DEP_FILE = CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/Test/test_drawHangman.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 @@ -106,7 +113,7 @@ build CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o: ############################################# # 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 +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 FLAGS = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk OBJECT_DIR = CMakeFiles/pmuw_projekt_notebinder.dir POST_BUILD = : diff --git a/src/main/c/Hangman/Test/test_drawHangman.c b/src/main/c/Hangman/Test/test_drawHangman.c new file mode 100644 index 0000000..c22e956 --- /dev/null +++ b/src/main/c/Hangman/Test/test_drawHangman.c @@ -0,0 +1,21 @@ +#include "test_drawHangman.h" +void test_drawHangman(int mistakes){ + switch (mistakes) { + case 0: + drawHangman(0); + case 1: + drawHangman(1); + case 2: + drawHangman(2); + case 3: + drawHangman(3); + case 4: + drawHangman(4); + case 5: + drawHangman(5); + case 6: + drawHangman(6); + case 10: // More than 6 mistakes + drawHangman(10); + } +} \ No newline at end of file diff --git a/src/main/c/Hangman/Test/test_drawHangman.h b/src/main/c/Hangman/Test/test_drawHangman.h new file mode 100644 index 0000000..2c0ba83 --- /dev/null +++ b/src/main/c/Hangman/Test/test_drawHangman.h @@ -0,0 +1,4 @@ +#ifndef PMUW_PROJEKT_NOTEBINDER_TEST_DRAWHANGMAN_H +#define PMUW_PROJEKT_NOTEBINDER_TEST_DRAWHANGMAN_H +#include "drawHangman.c" +#endif //PMUW_PROJEKT_NOTEBINDER_TEST_DRAWHANGMAN_H