From d21c6beda04b19398a3761ab4cb2f25a6affdeaf Mon Sep 17 00:00:00 2001 From: nuriHopfe Date: Thu, 29 Oct 2026 11:09:16 +0100 Subject: [PATCH 1/2] game.c --- game.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/game.c b/game.c index 803301f..dca0182 100644 --- a/game.c +++ b/game.c @@ -13,5 +13,47 @@ // Creates the word salad by placing words randomly and filling empty spaces int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount) { + srand(time(NULL)); + int i,j; + int Woertergesetzt = 0; + for (i=0 ; i Date: Wed, 4 Nov 2026 20:04:54 +0100 Subject: [PATCH 2/2] game.c: createWordSalad fertiggestellt (vertikal + Auffuellen) --- game.c | 68 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 19 deletions(-) diff --git a/game.c b/game.c index dca0182..7529d6f 100644 --- a/game.c +++ b/game.c @@ -3,7 +3,7 @@ #include #include -#define MAX_RAND_TRIES_PER_WORD 10 +#define MAX_RAND_TRIES_PER_WORD 1000 #define EMPTY_CHAR 0 //TODO: Spiellogik implementieren: @@ -16,44 +16,74 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi srand(time(NULL)); int i,j; int Woertergesetzt = 0; - for (i=0 ; i