From ef4fb6519bbb9b298e900dac1b42d90568e75e40 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 29 Oct 2026 10:35:38 +0100 Subject: [PATCH] main: Spielstart und Fehlermeldung ergaenzt --- main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 03da755..5984c1b 100644 --- a/main.c +++ b/main.c @@ -36,10 +36,17 @@ int main(int argc, char *argv[]) // Create the word salad by placing words into grid placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount); - // TODO: - // Check if all words were successfully placed - // Start the game if successful - // error message if some words couldn't be placed + if (wordCount == placedWords) + { + + startGame(wordSalad, SALAD_SIZE, words, wordCount, 800); + } + else + { + + fprintf(stderr, "Could only place %u of %u words!\n", placedWords, wordCount); + exitCode = EXIT_FAILURE; + } } else