From 14c2c5d4f3ef1c61eb8ff8e512ff5a72d8de76ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilli=20K=C3=BChnemund?= Date: Mon, 19 Oct 2026 08:50:29 +0200 Subject: [PATCH] Fehlerfall Wordplazierung --- Startcode/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Startcode/main.c b/Startcode/main.c index 03da755..c55d440 100644 --- a/Startcode/main.c +++ b/Startcode/main.c @@ -38,7 +38,14 @@ int main(int argc, char *argv[]) // TODO: // Check if all words were successfully placed - // Start the game if successful + if (wordCount == placedWords) { + + } + //Start the game if successful + else { + fprintf(stderr,"Error: Only %u of %u words could be placed.\n", placedWords, wordCount); + exitCode = EXIT_FAILURE; + } // error message if some words couldn't be placed }