todo in main.c mit chat gemacht

This commit is contained in:
Niklas Kegelmann 2025-10-22 20:48:47 +02:00
parent dd79f00618
commit 3899d22cde

View File

@ -38,20 +38,23 @@ int main(int argc, char *argv[])
// TODO: // TODO:
// Check if all words were successfully placed // Check if all words were successfully placed
if (placedWords == wordCount)
{
printf("All words have been placed.\n");
###START GAME###
}
else
{
###ERROR CODE###
}
// Start the game if successful // Start the game if successful
// error message if some words couldn't be placed // 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 else
{ {