Randomize.
This commit is contained in:
		@@ -4,6 +4,7 @@
 | 
				
			|||||||
#include <locale.h>
 | 
					#include <locale.h>
 | 
				
			||||||
#include <syslog.h>
 | 
					#include <syslog.h>
 | 
				
			||||||
#include <stdexcept>
 | 
					#include <stdexcept>
 | 
				
			||||||
 | 
					#include <ctime>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool Problem::seeded = false;
 | 
					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?
 | 
						// TODO(dev): Should this be in main.cpp?
 | 
				
			||||||
	if(!seeded)
 | 
						if(!seeded)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		// srand(time());
 | 
							srand(std::time(NULL));
 | 
				
			||||||
		srand(0);
 | 
					 | 
				
			||||||
		setlocale(LC_NUMERIC, ""); // apostrophe to enable thousands separator in printf statements.
 | 
							setlocale(LC_NUMERIC, ""); // apostrophe to enable thousands separator in printf statements.
 | 
				
			||||||
		seeded = true;
 | 
							seeded = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user