2017-05-15 12:08:10 +00:00
|
|
|
//
|
|
|
|
// Created by Antoine Bartuccio on 15/05/2017.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef FISH_FISH_UTILS_H
|
|
|
|
#define FISH_FISH_UTILS_H
|
|
|
|
|
2017-05-15 13:02:58 +00:00
|
|
|
#include "fish_types.h"
|
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
void crash(); // Tested
|
2017-05-15 12:08:10 +00:00
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
char *getInsult(); // Tested
|
2017-05-15 13:52:48 +00:00
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
void freeWordArray(WordArray *array); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
WordList * createWordList(); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 17:15:51 +00:00
|
|
|
WordList * sliceWordList(WordList *list, int min_index, int max_index);
|
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
void addWordList(WordList *list, char *word); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
void removeWordList(WordList *list); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 17:15:51 +00:00
|
|
|
void removeWordListElem(WordList *list, WordListElement *elem);
|
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
void freeWordList(WordList *list); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
WordArray * wordListToWordArray(WordList *list); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 00:58:16 +00:00
|
|
|
WordList * wordArrayToWordList(WordArray * array); // Tested
|
2017-05-15 13:02:58 +00:00
|
|
|
|
2017-05-16 17:15:51 +00:00
|
|
|
WordList * splitWordList(WordList *list, char * tokens);
|
|
|
|
|
2017-05-15 12:08:10 +00:00
|
|
|
#endif //FISH_FISH_UTILS_H
|