main: Spielstart und Fehlermeldung ergaenzt

This commit is contained in:
Simon committed 2026-10-29 10:35:38 +01:00
1 parent e931591801
commit ef4fb6519b
1 file changed
+11 -4
+11 -4
View File
@@ -36,10 +36,17 @@ 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 (wordCount == placedWords)
{
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
}
else
{
fprintf(stderr, "Could only place %u of %u words!\n", placedWords, wordCount);
exitCode = EXIT_FAILURE;
}
}
else