From b5d6a5d1b39b5445b61391a4a35ec8821ba91804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MiraSch=C3=BCtz?= Date: Mon, 26 Oct 2026 17:51:49 +0100 Subject: [PATCH] =?UTF-8?q?main.c=20ver=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Wordsalad/main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Wordsalad/main.c b/Wordsalad/main.c index 44d782e..6d8188e 100644 --- a/Wordsalad/main.c +++ b/Wordsalad/main.c @@ -40,13 +40,11 @@ int main(int argc, char *argv[]) // Check if all words were successfully placed // Start the game if successful // error message if some words couldn't be placed - if (placedWords == 1){ - continue; + if (placedWords == wordCount){ + startGame(wordSalad, SALAD_SIZE, words, wordCount, 800); }else { - createWordSalad(wordSalad, SALAD_SIZE, words, wordCount); - printf("The Words couln“d be placed in the Salad\n"); - } - + fprintf(stderr, "Could not open file %s for reading ...\n"); + exitCode = EXIT_FAILURE; } else {