Kleine Veränderung am main

This commit is contained in:
midzicer103376 committed 2026-10-15 20:54:01 +03:00
1 parent f728fee70a
commit 0095775e73
2 files changed
+46 -30

No files matched your search

+12 -5
View File
@@ -38,12 +38,19 @@ int main(int argc, char *argv[])
// Create the word salad by placing words into grid
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
// TODO:
// Check if all words were successfully placed
// Start the game if successful
// error message if some words couldn't be placed
if (placedWords == wordCount) // Prueft, ob alle Woerter platziert wurden.
{
printf("Alle %u Woerter wurden platziert!\n", placedWords); // Gibt eine Erfolgsmeldung aus.
startGame(wordSalad, SALAD_SIZE, words, wordCount, WINDOW_WIDTH); // Startet das grafische Wortsalat-Spiel.
}
else // Wird ausgefuehrt, wenn nicht alle Woerter platziert wurden.
{
fprintf(stderr, "Nur %u von %u Woertern platziert!\n", placedWords, wordCount); // Gibt eine Fehlermeldung aus.
exitCode = EXIT_FAILURE; // Kennzeichnet das Programm als fehlgeschlagen.
}
}
else
{
// Print error message if file couldn't be opened