Randomize.
This commit is contained in:
parent
58ddc34f88
commit
5b576860fa
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user