Compare commits

...

3 Commits
sven ... main

Author SHA1 Message Date
pvtrx
fa776f08ce Edited TODO-comments and moved them to where the code should be 2025-10-17 10:25:14 +02:00
pvtrx
647c3d194e deleted test line in game.c 2025-10-13 18:16:54 +02:00
pvtrx
717a2720ba Added specific ToDo comment 2025-10-13 16:39:32 +02:00
3 changed files with 23 additions and 7 deletions

19
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,19 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}

View File

@ -6,18 +6,17 @@
#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)
{
/* TODO: Implement Game Logic: Place words from the array char words[][MAX_WORD_LEN] randomly horizontally and vertivally
and fill empty spaces with random letters. Only cross words when the overlaping cell contains the same letter in both words. */
}
// Prints the word salad to console
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 <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
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.
}