From 94094ad001ed1a24ce349287334bfec61184de26 Mon Sep 17 00:00:00 2001 From: haemmerlre98889 Date: Wed, 5 Nov 2025 14:51:33 +0100 Subject: [PATCH] =?UTF-8?q?Spielstart=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 + .idea/Info2V.iml | 8 + .idea/editor.xml | 580 +++++++++++++++++++++++++++++++++++++++++++ .idea/modules.xml | 8 + .idea/vcs.xml | 6 + Start_Windows/main.c | 19 +- 6 files changed, 619 insertions(+), 10 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/Info2V.iml create mode 100644 .idea/editor.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml 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); + } } }