simon #4

Merged
wiesendsi102436 merged 6 commits from simon into main 2025-11-03 19:13:10 +00:00
2 changed files with 18 additions and 10 deletions
Showing only changes of commit c95c264a3a - Show all commits

View File

@ -37,17 +37,21 @@ int main(int argc, char *argv[])
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
// Check if all words were successfully placed
// Start the game if successful
// error message if some words couldn't be placed
if (placedWords < wordCount)
{
fprintf(stderr, "some words couldn't be placed\n");
exitCode = EXIT_FAILURE;
int notPlacedNum = wordCount - placedWords;
fprintf(stderr, "%d word(s) couldn't be placed\n", notPlacedNum);
}
// TODO:
// Start the game if successful
// correct parameters for startGame
// Start the game if at least 1 word has been successfully placed
else if (placedWords >= 1)
{
startGame(wordSalad, 80, words, placedWords, 800);
}
}
else
{

View File

@ -37,17 +37,21 @@ int main(int argc, char *argv[])
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
// Check if all words were successfully placed
// Start the game if successful
// error message if some words couldn't be placed
if (placedWords < wordCount)
{
fprintf(stderr, "some words couldn't be placed\n");
exitCode = EXIT_FAILURE;
int notPlacedNum = wordCount - placedWords;
fprintf(stderr, "%d word(s) couldn't be placed\n", notPlacedNum);
}
// TODO:
// Start the game if successful
// correct parameters for startGame
// Start the game if at least 1 word has been successfully placed
else if (placedWords >= 1)
{
startGame(wordSalad, 80, words, placedWords, 800);
}
}
else
{