forked from freudenreichan/info2Praktikum-Wortsalat
Test
This commit is contained in:
1 parent
93db739464
commit
2e24fdcec3
6 files changed
+163
-2
No files matched your search
@@ -3,12 +3,16 @@
|
||||
#include "input.h"
|
||||
#include "game.h"
|
||||
#include "graphicalGame.h"
|
||||
#include <time.h>
|
||||
|
||||
#define MAX_NUMBER_OF_WORDS 100
|
||||
#define SALAD_SIZE 20
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
srand(time(NULL));
|
||||
|
||||
int exitCode = EXIT_SUCCESS;
|
||||
|
||||
// Check if the correct number of arguments is provided
|
||||
@@ -40,6 +44,15 @@ int main(int argc, char *argv[])
|
||||
// Check if all words were successfully placed
|
||||
// Start the game if successful
|
||||
// error message if some words couldn't be placed
|
||||
if(placedWords == wordCount) // Wenn alle Wörter reinpassten, rufe das grafische Fenster auf
|
||||
{
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Could not place all words\n");
|
||||
exitCode = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user