#ifndef __UTILITIES_H__
#define __UTILITIES_H__
#include <cstdlib>
#include <ctime>
// Desc: Returns if a generated random percentage is less than
// or equal to a given liklihood
// Pre: The parameter percent should be a non-negative
// number, between 0 and 1
// Post: A random number between 0 and 100 will be generated and
// then converted to a percent between 0 and 1, then compared to
// the given parameter
bool GetRandomChance(const double percent);
// Desc: A random number will be generated between the given min
// and max and returned
// Pre: The template type T must be a number type that can be returned
// from the standard rand() function. The min parameter must be less
// than or equal to max parameter
// Post: A random number of type T will be generated between the two
// parameters and returned
template <typename T>
T ChooseRandomNumber(const T min, const T max);
// Desc: This function will return if the input parameter is between
// (inclusive) the given min and max parameters
// Pre: The min parameter must be less than or equal to the max parameter
// and they types T1 and T2 must be able to be compared to each other
// Post: The function will evaluate if the input parameter is between
// the given min and max and return true or false
template <typename T1, typename T2>
bool CheckRange(const T1 input, const T2 min, const T2 max);
// Desc: This function will evaluate if the given input is greater
// than or equal to the given min value
// Pre: The template types T1 and T2 must be able to be compared
// Post: The function will evaluate if the input parameter is at
// least the min parameter and return true or false
template <typename T1, typename T2>
bool CheckRange(const T1 input, const T2 min);
#include "utilities.hpp"
#endif