2 Commits
Author SHA1 Message Date
Angelos 60bb394fb7 Spielfeld kleiner gemacht 2026-10-20 19:47:41 +02:00
Angelos d7c7fe76f3 um Grafikversion erweitert 2026-10-20 19:47:21 +02:00
2 changed files with 4 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
#include "input.h" #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); int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount);
+3 -2
View File
@@ -1,12 +1,13 @@
#include <stdio.h> #include <stdio.h>
#include "graphicalGame.h"
#include "game.h" #include "game.h"
int main(void) int main(void)
{ {
char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN]; char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN];
const char words[][MAX_WORD_LEN] = { char words[][MAX_WORD_LEN] = {
"HALLO", "HALLO",
"WELT", "WELT",
"AUTO", "AUTO",
@@ -25,7 +26,7 @@ int main(void)
unsigned int wordCount = sizeof(words) / sizeof(words[0]); unsigned int wordCount = sizeof(words) / sizeof(words[0]);
int placedWords = createWordSalad(salad, MAX_SEARCH_FIELD_LEN, words, wordCount); 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); printf("Placed words: %d\n", placedWords);
return 0; return 0;