forked from freudenreichan/info2Praktikum-Wortsalat
finished Programm
This commit is contained in:
1 parent
cbfd7d5071
commit
f81b98bc1c
2 files changed
+22
-12
No files matched your search
+14
-4
@@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include "input.h"
|
||||
#include "game.h"
|
||||
#include <time.h>
|
||||
#include "graphicalGame.h"
|
||||
|
||||
#define MAX_NUMBER_OF_WORDS 100
|
||||
@@ -38,10 +39,19 @@ 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
|
||||
if (placedWords == (int)wordCount)
|
||||
{
|
||||
// Alle Wörter wurden erfolgreich platziert
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fehler beim Erstellen des Wortsalats
|
||||
fprintf(stderr,
|
||||
"Fehler beim Erstellen des Wortsalats. Rueckgabewert: %d\n",
|
||||
(int)placedWords);
|
||||
exitCode = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user