1 Commits
Author SHA1 Message Date
wiesendsi102436 e4477b08dc set the seed for the RNG just once at the beginning of the program
this improves randomness for tests where createNumbers() is called in rapid succession
2025-11-30 09:11:32 +01:00
+3
View File
@@ -39,6 +39,9 @@ int main(int argc, char *argv[])
{ {
int exitCode = EXIT_FAILURE; int exitCode = EXIT_FAILURE;
// set seed
srand(time(NULL));
if(argc != 2) if(argc != 2)
{ {
fprintf(stderr, "Usage: %s <player name>\n", argv[0]); fprintf(stderr, "Usage: %s <player name>\n", argv[0]);