finish wordsalad
- remove printf for debugging and add startGame to main.c
This commit is contained in:
1 parent
cbf5f85caf
commit
596e0a5519
7 files changed
+8
-35
No files matched your search
+6
-2
@@ -14,8 +14,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
int exitCode = EXIT_SUCCESS;
|
||||
|
||||
printf("start main\n");
|
||||
srand(time(NULL));
|
||||
|
||||
// Check if the correct number of arguments is provided
|
||||
if(argc != 2)
|
||||
{
|
||||
@@ -51,13 +51,17 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
// Start the game if successful
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// error message if some words couldn't be placed
|
||||
fprintf(stderr, "could not start wordsalad.\n");
|
||||
fprintf(stderr, "Could not start wordsalad. ");
|
||||
printf("Out of %d words only %d could be placed.\n", wordCount, placedWords);
|
||||
puts("GOOD LUCK for getting this game started :)");
|
||||
exitCode = EXIT_FAILURE;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user