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
This commit is contained in:
Simon Wiesend 2025-11-30 09:11:32 +01:00
parent a900d2d147
commit e4477b08dc
Signed by: wiesendsi102436
GPG Key ID: C18A833054142CF0

3
main.c
View File

@ -39,6 +39,9 @@ int main(int argc, char *argv[])
{
int exitCode = EXIT_FAILURE;
// set seed
srand(time(NULL));
if(argc != 2)
{
fprintf(stderr, "Usage: %s <player name>\n", argv[0]);