From 8592476b503c8cd67ea076fb4fac8c39735193cc Mon Sep 17 00:00:00 2001 From: kachelto100370 Date: Thu, 30 Oct 2025 19:00:23 +0100 Subject: [PATCH] doing my own version of game.c in ./Start_Linux --- Start_Linux/game.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Start_Linux/game.c b/Start_Linux/game.c index d8cc133..95d35f7 100644 --- a/Start_Linux/game.c +++ b/Start_Linux/game.c @@ -9,11 +9,15 @@ //TODO: Spiellogik implementieren: /* * Wörter aus der Wortliste zufällig horizontal oder vertikal platzieren * restliche Felder mit zufälligen Buchstaben füllen */ - +void emptyArray(); +int placeWord(); +void fillEmptySpots(); // 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) { - + emptyArray(salad); + placeWord(salad,words); + fillEmptySpots(salad); } // Prints the word salad to console @@ -21,3 +25,18 @@ void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], { } + +void emptyArray(char array[][]) +{ + +} + +int placeWord(char intoArray[][], char insertedWord[][]) +{ + return 0; +} + +void fillEmptySpots(char useArray[][]) +{ + +} \ No newline at end of file