Spielstart hinzugefügt

This commit is contained in:
2025-11-05 14:51:33 +01:00
parent 332e176ebd
commit 94094ad001
6 changed files with 619 additions and 10 deletions
+9 -10
View File
@@ -36,17 +36,16 @@ 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
}
else
{
// Print error message if file couldn't be opened
fprintf(stderr, "Could not open file %s for reading ...\n", argv[1]);
exitCode = EXIT_FAILURE;
if (placedWords == wordCount)
{
// Start the game if successful
startGame(wordSalad, SALAD_SIZE, words, wordCount,800);
}
else
{
fprintf(stderr, "Warning: Only %u out of %u words could be placed.\n", placedWords, wordCount);
}
}
}