diff --git a/Start_Windows/game.o b/Start_Windows/game.o deleted file mode 100644 index 4038773..0000000 Binary files a/Start_Windows/game.o and /dev/null differ diff --git a/Start_Windows/input.o b/Start_Windows/input.o deleted file mode 100644 index d0f0768..0000000 Binary files a/Start_Windows/input.o and /dev/null differ diff --git a/Start_Windows/main.c b/Start_Windows/main.c index 6975d7e..ed129e6 100644 --- a/Start_Windows/main.c +++ b/Start_Windows/main.c @@ -7,57 +7,6 @@ #define MAX_NUMBER_OF_WORDS 100 #define SALAD_SIZE 20 -int main(int argc, char *argv[]) -{ - int exitCode = EXIT_SUCCESS; - - // Check if the correct number of arguments is provided - if(argc != 2) - { - fprintf(stderr, "Usage: %s \n", argv[0]); - exitCode = EXIT_FAILURE; - } - else - { - char words[MAX_NUMBER_OF_WORDS][MAX_WORD_LEN]; // Array to hold the words to be used in the game - unsigned int wordCount = 0; - - FILE *file = fopen(argv[1], "r"); - - if(file != NULL) - { - unsigned int placedWords = 0; - char wordSalad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN]; // 2D array to store the word salad - - // Read words from file and store in 'words' array - wordCount = readWords(file, words, MAX_NUMBER_OF_WORDS); - fclose(file); - - // Create the word salad by placing words into grid - placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount); - - // TODO: (if Schleife implementieren, die das prüft) - // Check if all words were successfully placed - // Start the game if successful - // error message if some words couldn't be placed - - if (placedWords == wordCount){ - showWordSalad(wordSalad, placedWords); - } - else{ - printf("Error. The words couldn't be placed.\n"); - return -1; - } - - }#include -#include -#include "input.h" -#include "game.h" -#include "graphicalGame.h" - -#define MAX_NUMBER_OF_WORDS 100 -#define SALAD_SIZE 20 - int main(int argc, char *argv[]) { int exitCode = EXIT_SUCCESS; @@ -111,15 +60,5 @@ int main(int argc, char *argv[]) } } - return exitCode; -} - 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; - } - } - return exitCode; } \ No newline at end of file diff --git a/Start_Windows/runTests2.exe b/Start_Windows/runTests2.exe deleted file mode 100644 index 0717b14..0000000 Binary files a/Start_Windows/runTests2.exe and /dev/null differ