From 3172ff8143f692582b2d91f58d20fe82dc1fb854 Mon Sep 17 00:00:00 2001 From: Hannes Dienstbier Date: Mon, 19 Oct 2026 08:50:32 +0200 Subject: [PATCH] main TODO und makefile --- Startcode/main.c | 9 +++++++++ Startcode/makefile | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Startcode/main.c b/Startcode/main.c index 03da755..10684fc 100644 --- a/Startcode/main.c +++ b/Startcode/main.c @@ -40,6 +40,15 @@ 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 (wordCount == placedWords) + { + startGame(wordSalad, SALAD_SIZE, words, wordCount, 800); + } + else + { + fprintf(stderr, "Could not start, because not all words placed (%u of %u placed).\n", placedWords, wordCount); + exitCode = EXIT_FAILURE; + } } else diff --git a/Startcode/makefile b/Startcode/makefile index 7cf1d4c..873f18b 100644 --- a/Startcode/makefile +++ b/Startcode/makefile @@ -40,6 +40,9 @@ game.o: $(codefolder)/game.c graphicalGame.o: $(codefolder)/graphicalGame.c $(CC) -I$(raylibfolder) -c $(CFLAGS) $(codefolder)/graphicalGame.c +wordsalad_myversion: main.o + $(CC) -o wordsalad_myversion -L. $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS) + # -------------------------- # Unit Tests