diff --git a/Wordsalad/main.c b/Wordsalad/main.c index 44d782e..6d8188e 100644 --- a/Wordsalad/main.c +++ b/Wordsalad/main.c @@ -40,13 +40,11 @@ int main(int argc, char *argv[]) // Check if all words were successfully placed // Start the game if successful // error message if some words couldn't be placed - if (placedWords == 1){ - continue; + if (placedWords == wordCount){ + startGame(wordSalad, SALAD_SIZE, words, wordCount, 800); }else { - createWordSalad(wordSalad, SALAD_SIZE, words, wordCount); - printf("The Words couln“d be placed in the Salad\n"); - } - + fprintf(stderr, "Could not open file %s for reading ...\n"); + exitCode = EXIT_FAILURE; } else {