Randomize.

This commit is contained in:
David Vereb 2020-03-10 16:59:48 -04:00
parent 58ddc34f88
commit 5b576860fa

View File

@ -4,6 +4,7 @@
#include <locale.h>
#include <syslog.h>
#include <stdexcept>
#include <ctime>
bool Problem::seeded = false;
@ -14,8 +15,7 @@ Problem::Problem(PROBLEM_TYPE type, unsigned short max_digits, unsigned win_x, u
// TODO(dev): Should this be in main.cpp?
if(!seeded)
{
// srand(time());
srand(0);
srand(std::time(NULL));
setlocale(LC_NUMERIC, ""); // apostrophe to enable thousands separator in printf statements.
seeded = true;
}