From 3ff2b71e3f6ba93ddc78c6ac8efbbe3ec33e7f2e Mon Sep 17 00:00:00 2001 From: Saba Fazlali Date: Fri, 2 Feb 2024 16:34:24 +0100 Subject: [PATCH] win/lose message added --- CMakeLists.txt | 2 ++ cmake-build-debug/.ninja_deps | Bin 12956 -> 12788 bytes cmake-build-debug/.ninja_log | 11 +++++------ .../Testing/Temporary/LastTest.log | 4 ++-- cmake-build-debug/build.ninja | 9 ++++++++- src/main/c/Hangman/drawHangman.c | 16 +++++++++------- src/main/c/Hangman/playHangman.c | 9 +++++++++ 7 files changed, 35 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 763f8e7..a83ec3e 100644 --- a/CMakeLists.txt +++ b/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 ) diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps index 3b1c1d1566359ee9a4ad08b47ee6fac69c956f0e..df97cc577c88d495e15633ebfcc2b144956f5e17 100644 GIT binary patch delta 25 hcmbP}`XzZoiss}uh8q|ICJLHPwo~QU?4`Ac9RQSF3G4s> delta 50 zcmey8JSTNSil*oi28M=Y1_p-xIWjK;3f7CK0NJUN7s^ha9HC)1nOB== 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"); } } \ No newline at end of file diff --git a/src/main/c/Hangman/playHangman.c b/src/main/c/Hangman/playHangman.c index 31cfb79..6930fdd 100644 --- a/src/main/c/Hangman/playHangman.c +++ b/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; }