diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Info2V.iml b/.idea/Info2V.iml new file mode 100644 index 0000000..bc2cd87 --- /dev/null +++ b/.idea/Info2V.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 0000000..95d51a7 --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,580 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f5b4d89 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Start_Windows/main.c b/Start_Windows/main.c index 03da755..800f349 100644 --- a/Start_Windows/main.c +++ b/Start_Windows/main.c @@ -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); + } } }