This commit is contained in:
Helena Köhler 2025-11-04 18:50:22 +01:00
commit 0d192b71fd
3 changed files with 9 additions and 11 deletions

View File

@ -38,7 +38,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
}
strncpy(words[word_count], token, MAX_WORD_LEN -1);
words[word_count][MAX_WORD_LEN -1] = '\0';
word_count++
word_count++;
}
//Nächstes Wort
token = strtok(NULL, " ,;\n");

View File

@ -42,18 +42,16 @@ int main(int argc, char *argv[])
// error message if some words couldn't be placed
if (placedWords == wordCount)
{
printf("Alle %u Wörter wurden erfolgreich platziert!\n\n", wordCount);
//Spiel starten
printf("Alle %u Wörter wurden erfolgreich plazieret!\n\n", wordCount);
// Spiel Start
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
}
else
{
fprintf(stderr, "Fehler: Nur %u von %u Wörtern konnten platziert werden.\n", placedWords, wordCount);
fprintf(stderr, "Fehler: Nur %u von %u Wörtern konnten plaziert werden.\n", placedWords, wordCount);
exitCode = EXIT_FAILURE;
}
}
else
{

Binary file not shown.