generated from freudenreichan/info2Praktikum-Wortsalat
zweiter Versuch
This commit is contained in:
1 parent
4d7ccdf9ff
commit
bd39d8ad5e
2 files changed
+60
-20
No files matched your search
+8
-2
@@ -10,7 +10,7 @@
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int exitCode = EXIT_SUCCESS;
|
||||
|
||||
srand(time(NULL));
|
||||
// Check if the correct number of arguments is provided
|
||||
if(argc != 2)
|
||||
{
|
||||
@@ -35,7 +35,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Create the word salad by placing words into grid
|
||||
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
||||
|
||||
if (placedWords == wordCount) {
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount, 1024);
|
||||
}
|
||||
else {
|
||||
printf("Could only %u of %u words. ", placedWords, wordCount);
|
||||
exitCode = EXIT_FAILURE;
|
||||
}
|
||||
// TODO:
|
||||
// Check if all words were successfully placed
|
||||
// Start the game if successful
|
||||
|
||||
Reference in new issue
Block a user