diff --git a/Start_Windows/main.c b/Start_Windows/main.c index 17341e3..2f32a39 100644 --- a/Start_Windows/main.c +++ b/Start_Windows/main.c @@ -41,8 +41,18 @@ int main(int argc, char *argv[]) // TODO: // Check if all words were successfully placed - // Start the game if successful - // error message if some words couldn't be placed + if(placedWords == wordCount) + { + // Start the graphical game + startGame(wordSalad, SALAD_SIZE, words, wordCount, 800); + } + else + { + // Error message if some words couldn't be placed + fprintf(stderr, "Only %u out of %u words could be placed in the word salad.\n", placedWords, wordCount); + exitCode = EXIT_FAILURE; + } + } else