From 5eba64da58978824f99259ea221a13b21f335a21 Mon Sep 17 00:00:00 2001 From: rafa_99 Date: Tue, 15 Dec 2020 23:05:17 +0000 Subject: Added Documentation and Updated Fast Seeded Number Generator --- utils.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'utils.h') diff --git a/utils.h b/utils.h index 6cfbc80..0903c86 100644 --- a/utils.h +++ b/utils.h @@ -2,8 +2,18 @@ #define MAX_LINE 256 +/* Checks if a file exists */ int checkIfFileExists(char *path); +/* Turns a string into a number by + * using the sum of its ascii values. + */ int numerize(char *string); +/* Counts the lines from a dictionary file */ int lineCounter(FILE *dictionary); +/* Returns a specified line from a dictionary file */ char* getLine(FILE *dictionary, int line); +/* Returns a random number within the inclusive number range + * and based on the inputted question. + * Uses a fast seeded number generator. + */ int getRandomNumber(int min, int max, char *question); -- cgit v1.2.3