replace math.random and math.randomseed with MersenneTwister

This commit is contained in:
Mark Cannon
2011-08-22 11:45:45 -07:00
parent 877143a54e
commit 657217beda
2 changed files with 58 additions and 0 deletions
+6
View File
@@ -12,6 +12,12 @@ Trace = lua.Trace
Warn = lua.Warn
print = Trace
-- Use MersenneTwister in place of math.random and math.randomseed.
if MersenneTwister then
math.random = MersenneTwister.Random
math.randomseed = MersenneTwister.Seed
end
PLAYER_1 = "PlayerNumber_P1"
PLAYER_2 = "PlayerNumber_P2"
NUM_PLAYERS = #PlayerNumber