Finale Version V1

Finale Version V1
Finale Version V1
Finale Version V1
Please enter the commit message for your changes. Lines starting
This commit is contained in:
Efe Turhan 2025-11-06 14:09:10 +01:00
parent 442a5aabed
commit d3ba3a29e2
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
while (token != NULL && count < maxWordCount) {
trim_and_toupper(words[count], token, MAX_WORD_LEN);
if (words[count][0] !='\n'){
if (words[count][0] !='\0'){
count++;
}
token = strtok(NULL, DELIMITERS);

View File

@ -25,7 +25,7 @@ int main(int argc, char *argv[]) {
wordCount = readWords(file, words, MAX_NUMBER_OF_WORDS);
fclose(file);
placedWords = createWordSalad(wordSalad, SALAD_SIZE, (const char(*)[MAX_WORD_LEN])words, wordCount);
if (placedWords > 0) {
if (placedWords == wordCount) {
printf("Info: %d Wörter geladen und platziert. Starte speil...\n", placedWords);
showWordSalad(wordSalad, SALAD_SIZE);
startGame(wordSalad, SALAD_SIZE, words, wordCount,WINDOW_WIDTH);