forked from freudenreichan/info2Praktikum-Wortsalat
Compare commits
2
Commits
1725da2148
...
Spiellogik
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60bb394fb7 | ||
|
|
d7c7fe76f3 |
No files matched your search
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "input.h"
|
||||
|
||||
#define MAX_SEARCH_FIELD_LEN 100
|
||||
#define MAX_SEARCH_FIELD_LEN 20
|
||||
|
||||
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount);
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "graphicalGame.h"
|
||||
#include "game.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN];
|
||||
|
||||
const char words[][MAX_WORD_LEN] = {
|
||||
char words[][MAX_WORD_LEN] = {
|
||||
"HALLO",
|
||||
"WELT",
|
||||
"AUTO",
|
||||
@@ -25,7 +26,7 @@ int main(void)
|
||||
unsigned int wordCount = sizeof(words) / sizeof(words[0]);
|
||||
|
||||
int placedWords = createWordSalad(salad, MAX_SEARCH_FIELD_LEN, words, wordCount);
|
||||
|
||||
startGame(salad, MAX_SEARCH_FIELD_LEN, words, wordCount, 1000);
|
||||
printf("Placed words: %d\n", placedWords);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user