Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-10-24 20:17:47 +02:00
3 changed files with 93 additions and 3 deletions
+14 -1
View File
@@ -36,11 +36,24 @@ int main(int argc, char *argv[])
// Create the word salad by placing words into grid
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
// TODO:
// TODO: (erledigt von Niklas)
// Check if all words were successfully placed
// Start the game if successful
// error message if some words couldn't be placed
if (placedWords == wordCount)
{
printf("All words have been placed successfully.\n");
// Start graphical game
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
}
else
{
fprintf(stderr, "Error: Only %u out of %u words could be placed.\n", placedWords, wordCount);
fprintf(stderr, "Try reducing the number or length of words.\n");
exitCode = EXIT_FAILURE;
}
}
else
{