From d5be49e0ff920321f80d8c927c8d1933fdf7c8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ida=20R=C3=B6ssel?= Date: Mon, 19 Oct 2026 09:08:06 +0200 Subject: [PATCH] WiP game.c --- Wordsalad/game.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Wordsalad/game.c b/Wordsalad/game.c index 948a26c..399bf8d 100644 --- a/Wordsalad/game.c +++ b/Wordsalad/game.c @@ -15,16 +15,14 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount) { srand(time(NULL)); - char bustaben[] = "abcdefghijklmnopqrstuvwxyz"; + char bustaben[] = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"; char zufall = bustaben[rand() % 26]; printf("Zufaelliger Bustabe: %c\n", zufall); - const char words[][MAX_WORD_LEN] ={ - "Yeti","Nessie","Werwolf","Vampir","Monster","Hydra","Frankenstein","Dracula","KingKong","Gremlin","Kobold","Hexe","Poltergeist","Gespenst,""Oge" + const char words[15][MAX_WORD_LEN] = "Yeti,Nessie,Werwolf,Vampir,Monster,Hydra,Frankenstein,Dracula,KingKong,Gremlin,Kobold,Hexe,Poltergeist,Gespenst,Oge"; + - }; - unsigned int wordcound = 15; return 0; }