diff --git a/Start_Mac/main.c b/Start_Mac/main.c index 9a98d80..0175942 100644 --- a/Start_Mac/main.c +++ b/Start_Mac/main.c @@ -42,9 +42,7 @@ int main(int argc, char *argv[]) if(placedWords == wordCount) { // Start the game if successful - printf("All %u words were successfully placed in the word salad!\n", wordCount); - createWordSalad(wordSalad, SALAD_SIZE, words, wordCount); - showWordSalad(wordSalad, SALAD_SIZE); + startGame(wordSalad,SALAD_SIZE,words,wordCount,SALAD_SIZE); } else { diff --git a/Start_Windows/game.c b/Start_Windows/game.c index d8cc133..60ef3b3 100644 --- a/Start_Windows/game.c +++ b/Start_Windows/game.c @@ -19,5 +19,12 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi // Prints the word salad to console void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen) { - + for (int i=0; i < searchFieldLen; i++) { + for (int j=0; j < searchFieldLen; j++) { + printf("$c",salad[i][j]); + printf(" "); + } + printf ("\n"); + } } +