a little elegance

This commit is contained in:
Axel Kittenberger 2010-11-24 21:36:25 +00:00
parent 6870d83001
commit bf8fc03480

View File

@ -16,10 +16,7 @@ end
----- -----
-- initializes the pseudo random generator -- initializes the pseudo random generator
-- if environemnt "SEED" is set, use that as seed. -- if environemnt "SEED" is set, use that as seed.
local seed = os.getenv("SEED") local seed = os.getenv("SEED") or os.time()
if not seed then
seed = os.time()
end
math.randomseed(seed) math.randomseed(seed)
cwriteln("random seed: ", seed) cwriteln("random seed: ", seed)