newest version

This commit is contained in:
Adrian Schulze committed 2026-10-30 10:12:35 +01:00
commit 5be8b48bd2
4 files changed
+5 -5

No files matched your search

+2 -3
View File
@@ -27,9 +27,8 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
maxLength = findmaxLength(words, wordCount);
// Size of Field!
if (searchFieldLen < maxLength)
sizeOfField = maxLength;
else
sizeOfField = searchFieldLen;
return returnValue;
sizeOfField = searchFieldLen;
initializeField(sizeOfField, salad);
// for all words put them in
for (unsigned int i = 0; i < wordCount; i++){
+1 -1
View File
@@ -9,7 +9,7 @@
// Read words from file and store in 'words' array
static int createSingleWords(char text[MAX_LINE_LEN], char words[][MAX_WORD_LEN], unsigned int maxWordCount);
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
unsigned int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
int wordCount = 0;
char lineRead[MAX_LINE_LEN];
+1 -1
View File
@@ -6,6 +6,6 @@
#define MAX_WORD_LEN 100
#define MAX_LINE_LEN 1024
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount);
unsigned int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount);
#endif
+1
View File
@@ -47,6 +47,7 @@ int main(int argc, char *argv[])
// Start the game if successful
// error message if some words couldn't be placed
}
else
{