From da621b8429228fb940c2372e164224227d625aad Mon Sep 17 00:00:00 2001 From: Felix Hesse Date: Mon, 2 Nov 2026 21:29:59 +0100 Subject: [PATCH] =?UTF-8?q?Makefile=20angepasst=20+=20srand=20bei=20gamec?= =?UTF-8?q?=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Startcode/game.c | 2 ++ Startcode/makefile | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Startcode/game.c b/Startcode/game.c index cda8fa6..4625659 100644 --- a/Startcode/game.c +++ b/Startcode/game.c @@ -16,6 +16,8 @@ int createWordSalad( { unsigned int placedWords = 0; + srand((unsigned int)time(NULL)); + // Check the dimensions if (searchFieldLen == 0 || searchFieldLen > MAX_SEARCH_FIELD_LEN) diff --git a/Startcode/makefile b/Startcode/makefile index 7cf1d4c..510925a 100644 --- a/Startcode/makefile +++ b/Startcode/makefile @@ -16,12 +16,21 @@ raylibfolder = ./raylib unityfolder = ./unity codefolder = . + # -------------------------- # initiales Spiel bauen # -------------------------- wordsalad_initial: $(CC) -o wordsalad_initial -L. $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS) + +# -------------------------- +# 2) Eigene main.c mit vorgebauten Bibs +# -------------------------- +wordsalad_myversion: main.o graphicalGame.o $(BINARIES)/libwordsalad.a $(BINARIES)/libraylib.a + $(CC) $(CFLAGS) -o wordsalad_myversion main.o graphicalGame.o $(BINARIES)/libwordsalad.a $(BINARIES)/libraylib.a $(LDFLAGS) + + # -------------------------- # Normales Spiel bauen # --------------------------