From 0a8ed9bdfeb6c5f50eaa0ec85b0d4d2784a46544 Mon Sep 17 00:00:00 2001 From: Kruschat Date: Tue, 28 Oct 2025 18:44:34 +0100 Subject: [PATCH] =?UTF-8?q?Main=20ausgef=C3=BCllt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Start_Windows/main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Start_Windows/main.c b/Start_Windows/main.c index 03da755..3c75bc5 100644 --- a/Start_Windows/main.c +++ b/Start_Windows/main.c @@ -38,9 +38,24 @@ int main(int argc, char *argv[]) // TODO: // Check if all words were successfully placed + if(wordCount == placedWords) + { + exitCode = EXIT_SUCCESS; + } + else + { + exitCode = EXIT_FAILIURE; + } // Start the game if successful + if(exitCode == EXIT_SUCCESS) + { + void startGame(const char wordSalad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldSize, char words[][MAX_WORD_LEN], unsigned int numberOfWords, unsigned int windowWidth); + } // error message if some words couldn't be placed - + else if(exitCode == EXIT_FAILURE) + { + printf("Bei der Platzierung ist etwas falsch gelaufen!"); + } } else {