generated from freudenreichan/info2Praktikum-Wortsalat
added check of placed Words
This commit is contained in:
1 parent
b685b56273
commit
1a796d8144
1 file changed
+17
@@ -41,6 +41,23 @@ int main(int argc, char *argv[])
|
||||
// Start the game if successful
|
||||
// error message if some words couldn't be placed
|
||||
|
||||
if(wordCount > 19)
|
||||
{
|
||||
if(placedWords != 20)
|
||||
{
|
||||
exitCode = EXIT_FAILURE;
|
||||
printf("Only %d of %d possible words could be placed\n", placedWords, 20);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(placedWords != wordCount)
|
||||
{
|
||||
exitCode = EXIT_FAILURE;
|
||||
printf("Only %d of %d possible words could be placed\n", placedWords, wordCount);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user