27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
//Bearbeitet von Lukas Wörner, 02.11.25
|
|
#ifndef GAME_H
|
|
#define GAME_H
|
|
|
|
#include "input.h"
|
|
|
|
#define MAX_SEARCH_FIELD_LEN 100
|
|
#define MIN_WORD_LEN 2
|
|
|
|
typedef enum {RECHTS, UNTEN} RICHTUNG;
|
|
|
|
typedef struct
|
|
{
|
|
int x, y;
|
|
RICHTUNG richtung;
|
|
}Position;
|
|
|
|
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount);
|
|
void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen);
|
|
void clearWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen);
|
|
void fillWordsaladRand(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen);
|
|
int findPossiblePositions(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], int wordidx, Position positions[]);
|
|
int fuelleSalatMitWoertern(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], Position position[], unsigned int wordcount);
|
|
|
|
|
|
#endif
|