methods that I edited/found useful and want to keep for easy reusing
#include "Library.h"
using namespace Engch;
Library ec;
highlight the next character onwards with colorChoice in cmd
7 is default color
// example
printf("[");
ec.changeCmdTextColor(hConsole, 10);
printf("%c", 'x'); // highlighted char
ec.changeCmdTextColor(hConsole, 7); // reset color back to default
printf("]");
return a random double from 0 to range
double modulus double, w/floating number point error
return x mod y in double.
used in if condition to run only once
return true is not run before, false if run before
// example --> no yes yes
std::string e = "no";
printf("%s\n", e.c_str()); // no
if (ec.isDoneBefore()){
e = "yes";
}
printf("%s\n", e.c_str()); // yes
if (ec.isDoneBefore()){ // never enter as it ran before already
e = "no";
}
printf("%s\n", e.c_str()); // yes