From 04a63ab64dee2e657ca87a3ca8cbbcb662f06be1 Mon Sep 17 00:00:00 2001 From: Max Gloeckner Date: Fri, 16 Oct 2026 09:55:43 +0200 Subject: [PATCH] removed printf --- Startcode/game.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Startcode/game.c b/Startcode/game.c index fd2ecd7..d24edc0 100644 --- a/Startcode/game.c +++ b/Startcode/game.c @@ -6,11 +6,7 @@ #define MAX_RAND_TRIES_PER_WORD 10 #define EMPTY_CHAR 0 -//TODO: Spiellogik implementieren: -/* * Wörter aus der Wortliste zufällig horizontal oder vertikal platzieren - * restliche Felder mit zufälligen Buchstaben füllen */ -// 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) //salad = Array das als Tabelle dient; searchFieldLEN = tatsächliche Länge des Spielfelds; words = Liste der möglichen Suchwörter; wordCount = Anzahl der Wörter in words { @@ -28,7 +24,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi for (unsigned i = 0; i < wordCount; i++) { unsigned int wortlaenge = strlen(words[i]); //Strlen gibt die länge der Zeichenkette an - if (wortlaenge == 0) //Leere Listenplätze werden Übersprungen + if (wortlaenge == 0) //Leere Listenplätze werden Übersprungen { continue; } @@ -71,7 +67,6 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi } } //4. Eingabe der Wörter; (Wörter eintragen) - printf("Test\n"); if (!check) { for (unsigned int j = 0; j < wortlaenge; j++) @@ -85,7 +80,6 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi salad[y_position + j][x_position] = words[i][j]; } } - printf("Wort %d plaziert.\n", plaziert); plaziert++; break; }