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
|
||||
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
||||
|
||||
// TODO:
|
||||
// Check if all words were successfully placed
|
||||
// Start the game if successful
|
||||
// error message if some words couldn't be placed
|
||||
|
||||
}
|
||||
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;
|
||||
if (placedWords != 0)
|
||||
{
|
||||
// Start the game if successful
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount,800);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Warning: Only %u out of %u words could be placed.\n", placedWords, wordCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user