#include #include #include "input.h" #include "game.h" #include "graphicalGame.h" #include #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 char sorter[MAX_WORD_LEN]; // Read words from file and store in 'words' array wordCount = readWords(file, words, MAX_NUMBER_OF_WORDS); fclose(file); for(int i=0;i