From df8242479336c791f3274868a1e36d7dd318ab3a Mon Sep 17 00:00:00 2001 From: Angelos Date: Sun, 18 Oct 2026 17:19:43 +0200 Subject: [PATCH] Spielinitialiserung in main.c --- Startcode/main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Startcode/main.c b/Startcode/main.c index 03da755..87f55bb 100644 --- a/Startcode/main.c +++ b/Startcode/main.c @@ -35,9 +35,17 @@ int main(int argc, char *argv[]) // Create the word salad by placing words into grid placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount); + + if(placedWords==wordCount){ //checked if all words were succesfully placed + startGame(wordSalad; SALAD_SIZE; words; wordCount; 1000); // Starting the game + } + else{ + printf("Fehler! Es konnten nicht alle Wörter plaziert werden"); //Error if some words couldnt be placed + } - // TODO: - // Check if all words were successfully placed + + // DONE + // Check if all words were successfully placed3 // Start the game if successful // error message if some words couldn't be placed