Merge remote-tracking branch 'origin/main'
This commit is contained in:
+14
-1
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user