mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-19 12:15:31 +02:00
CLOSES #1496
This commit is contained in:
@@ -29,7 +29,9 @@ local LinkBattle = {}
|
||||
-- Deterministic Park-Miller PRNG: both sides must roll identical
|
||||
-- streams, so love.math.random can't be used.
|
||||
local function makeRng(seed)
|
||||
local s = seed % 2147483647
|
||||
local s = tonumber(seed) or 1
|
||||
if s ~= s or s == math.huge or s == -math.huge then s = 1 end
|
||||
s = math.floor(s) % 2147483647
|
||||
if s <= 0 then s = s + 2147483646 end
|
||||
return function(a, b)
|
||||
s = (s * 16807) % 2147483647
|
||||
|
||||
Reference in New Issue
Block a user