diff --git a/Start_Windows/game.o b/Start_Windows/game.o index 6193e71..ce26755 100644 Binary files a/Start_Windows/game.o and b/Start_Windows/game.o differ diff --git a/Start_Windows/input.c b/Start_Windows/input.c index a72759b..0688187 100644 --- a/Start_Windows/input.c +++ b/Start_Windows/input.c @@ -14,15 +14,6 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) char *token; unsigned int wordCount = 0; - /* wird words.txt schon in main geöffnet? - file = fopen ("words.txt", "r"); // Öffne words.txt zum lesen - - if (file == NULL) - { - return -1; - } - */ - while (fgets (puffer, 256, file) != NULL) //liest words.txt ein und speichert es in puffer { token = strtok(puffer, teiler); //token teilt erstes Wort und speichert es in sich ab @@ -31,6 +22,10 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) { strncpy(words[wordCount], token, MAX_WORD_LEN -1); //kopiert das Wort von token in das array words words[wordCount][MAX_WORD_LEN-1] = '\0'; + // Konvertiere jedes Zeichen zu Großbuchstaben + for (int i = 0; words[wordCount][i] != '\0'; i++) + words[wordCount][i] = toupper(words[wordCount][i]); + wordCount++; token = strtok (NULL, teiler); //nächstes Wort } diff --git a/Start_Windows/input.o b/Start_Windows/input.o index e59e4fd..0eca5f3 100644 Binary files a/Start_Windows/input.o and b/Start_Windows/input.o differ diff --git a/Start_Windows/runTests.exe b/Start_Windows/runTests.exe index c2de870..c2e2f71 100644 Binary files a/Start_Windows/runTests.exe and b/Start_Windows/runTests.exe differ diff --git a/Start_Windows/unit_tests.c b/Start_Windows/unit_tests.c index 50a62cf..68f3efb 100644 --- a/Start_Windows/unit_tests.c +++ b/Start_Windows/unit_tests.c @@ -1,7 +1,7 @@ #include #include #include -#include "unity.h" +#include "unity/unity.h" #include "input.h" #include "game.h"