From c93dd9a734cbb126be77c448f4ddf1b7b4c1f8d6 Mon Sep 17 00:00:00 2001 From: kayaoglura103830 Date: Mon, 26 Oct 2026 13:48:53 +0100 Subject: [PATCH] =?UTF-8?q?TODOS=20bei=20main=20.gitignore=20verbessert=20?= =?UTF-8?q?makefile=20vervollst=C3=A4ndigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- Startcode/main.c | 15 ++++++++++++--- Startcode/makefile | 7 +++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0fbd721..e645cf8 100644 --- a/.gitignore +++ b/.gitignore @@ -35,9 +35,10 @@ *.i*86 *.x86_64 *.hex +Startcode/wordsalad_myversion Startcode/wordsalad_initial Startcode/wordsalad -test +runtest # Debug files *.dSYM/ diff --git a/Startcode/main.c b/Startcode/main.c index 03da755..9350f79 100644 --- a/Startcode/main.c +++ b/Startcode/main.c @@ -38,9 +38,18 @@ int main(int argc, char *argv[]) // TODO: // Check if all words were successfully placed - // Start the game if successful - // error message if some words couldn't be placed - + if (placedWords == wordCount) + { + // Start the game if successful + startGame(wordSalad, SALAD_SIZE, words, wordCount, 600); + } + else + { + // error message if some words couldn't be placed + fprintf(stderr, "Fehler. Es konnten nicht alle Wörter Platziert werden."); + exitCode = EXIT_FAILURE; + } + } else { diff --git a/Startcode/makefile b/Startcode/makefile index 7cf1d4c..9d691ae 100644 --- a/Startcode/makefile +++ b/Startcode/makefile @@ -22,6 +22,13 @@ codefolder = . wordsalad_initial: $(CC) -o wordsalad_initial -L. $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS) +# Eigenes Target + +wordsalad_myversion: main.o graphicalGame.o $(BINARIES)/libraylib.a + $(CC) $(CFLAGS) -o wordsalad_myversion main.o graphicalGame.o $(BINARIES)/libwordsalad.a $(BINARIES)/libraylib.a $(LDFLAGS) + + + # -------------------------- # Normales Spiel bauen # --------------------------