Edited TODO-comments and moved them to where the code should be

This commit is contained in:
pvtrx 2025-10-17 10:25:14 +02:00
parent 647c3d194e
commit fa776f08ce
2 changed files with 2 additions and 7 deletions

View File

@ -6,9 +6,6 @@
#define MAX_RAND_TRIES_PER_WORD 10 #define MAX_RAND_TRIES_PER_WORD 10
#define EMPTY_CHAR 0 #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 // 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) int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount)
@ -21,5 +18,5 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
// Prints the word salad to console // Prints the word salad to console
void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen) void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen)
{ {
//TODO: print word salad to console
} }

View File

@ -2,11 +2,9 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
// TODO:
// eine Funktion implementieren, die ein einzelnes Wort aus einer Textdatei (words.txt) einliest und als C-String zurückgibt.
// Read words from file and store in 'words' array // Read words from file and store in 'words' array
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{ {
//TODO: Implement function to read words from file words.txt and store them in the words array. See, that in the file words are not seperated only by , ; or space but also by new lines.
} }