generated from freudenreichan/info2Praktikum-Wortsalat
Main.c um die fehldene Funktion erweitert
This commit is contained in:
parent
27dc4dd02b
commit
e2de303489
@ -36,17 +36,16 @@ int main(int argc, char *argv[])
|
|||||||
// Create the word salad by placing words into grid
|
// Create the word salad by placing words into grid
|
||||||
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// Check if all words were successfully placed
|
// Check if all words were successfully placed
|
||||||
|
if (placedWords != 0)
|
||||||
|
{
|
||||||
// Start the game if successful
|
// Start the game if successful
|
||||||
// error message if some words couldn't be placed
|
startGame(wordSalad, SALAD_SIZE, words, wordCount,800);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Print error message if file couldn't be opened
|
fprintf(stderr, "Warning: Only %u out of %u words could be placed.\n", placedWords, wordCount);
|
||||||
fprintf(stderr, "Could not open file %s for reading ...\n", argv[1]);
|
}
|
||||||
exitCode = EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user