From 17a74ddc81472039ace45ef243cd0bce51435f72 Mon Sep 17 00:00:00 2001 From: kachelto100370 Date: Tue, 4 Nov 2025 10:45:17 +0100 Subject: [PATCH] =?UTF-8?q?arbeite=20sp=C3=A4ter=20dran,=20jetzt=20n=C3=A4?= =?UTF-8?q?chste=20praktikum=20aufgabe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Start_Linux/game.c | 2 +- Start_Linux/input.c | 2 +- Start_Linux/main.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Start_Linux/game.c b/Start_Linux/game.c index fa70d1a..fa480ae 100644 --- a/Start_Linux/game.c +++ b/Start_Linux/game.c @@ -54,7 +54,7 @@ int placeWord(char intoArray[][], char insertedWord[][]) int xCord = rand() % MAX_SEARCH_FIELD_LEN; int yCord = rand() % MAX_SEARCH_FIELD_LEN; int isHorizontal = rand() % 2; - + unsigned int wordLength = strlen(insertedWord[numberWord][0]); if(isHorizontal) { if(xCord + sizeof(insertedWord[numberWord][0]) <= MAX_SEARCH_FIELD_LEN) diff --git a/Start_Linux/input.c b/Start_Linux/input.c index ea19ad0..bb809c7 100644 --- a/Start_Linux/input.c +++ b/Start_Linux/input.c @@ -15,7 +15,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN],unsigned int maxWordCount) } char teiler[] = " ;,.\n"; - char *aktuellesWort; + char aktuellesWort; int wortAnzahl = 0; while (fgets(puffer, MAX_WORD_LEN, file) != NULL) diff --git a/Start_Linux/main.c b/Start_Linux/main.c index 8da67d8..89c1e7b 100644 --- a/Start_Linux/main.c +++ b/Start_Linux/main.c @@ -41,6 +41,7 @@ int main(int argc, char *argv[]) if(placedWords == wordCount) { // Start the game if successful + startGame(wordSalad,MAX_NUMBER_OF_WORDS,placedWords, wordCount,1024); } else {