diff xrogue/main.c @ 252:3d4252fa2ed3

Use more portable random seed generation. The new function md_random_seed() has replaced time() + getpid() and similar methods. Putting everything in mdport.c slightly reduces the warnings and workarounds.
author John "Elwin" Edwards
date Sat, 28 Jan 2017 15:49:41 -0500
parents 7c1cb43f346e
children e52a8a7ad4c5
line wrap: on
line diff
--- a/xrogue/main.c	Sat Jan 28 11:45:36 2017 -0500
+++ b/xrogue/main.c	Sat Jan 28 15:49:41 2017 -0500
@@ -166,7 +166,7 @@
         seed = atoi(getenv("SEED")); 
     }
     else {
-        seed = (int) time(&now) + getpid();
+        seed = md_random_seed();
     }
     if (wizard)
         printf("Hello %s, welcome to dungeon #%d\n", whoami, seed);