simon #4
@ -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
|
||||
{
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user