-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolvedSpellList.h
28 lines (22 loc) · 916 Bytes
/
solvedSpellList.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _SOLVED_SPELL_LIST_H_
#define _SOLVED_SPELL_LIST_H_
#define DEFAULT_SOLVED_LEN 1000
#define MAX_WORD_LEN 32
typedef struct solvedSpellListEntry
{
char word[MAX_WORD_LEN]; //word searched
int correct; //only valid after the word has been checked and returned.
//-1 on creation of the struct instance. After the word is checked, 0 for incorrect, or 1 for correct
} solvedSpellListEntry;
typedef struct solvedSpellList
{
solvedSpellListEntry** entries;
int num_entries;
} solvedSpellList;
void initSolvedList(solvedSpellList** ppList);
int findSolvedWord(solvedSpellList** list, const char* word);
int getSolvedWordSuccess(solvedSpellList** list, const char* word);
void removeSolvedWord(solvedSpellList** list, const char* word);
void addSolvedWord(solvedSpellList** list, const char* word, int correct);
void destroySolvedList(solvedSpellList** list);
#endif //_SOLVED_SPELL_LIST_H_