forked from freudenreichan/info2Praktikum-Wortsalat
Anfang von game.c
This commit is contained in:
1 parent
93db739464
commit
8c4e01b75c
35 files changed
+13
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "game.h"
|
||||
#include "input.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -13,5 +14,17 @@
|
||||
// Creates the word salad by placing words randomly and filling empty spaces
|
||||
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 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"
|
||||
|
||||
};
|
||||
unsigned int wordcound = 15;
|
||||
|
||||
return 0;
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user