Use of pairs causes some map generators to be non-deterministic. Iteration order of pairs is undefined, so code like this won't give the same result every time it's run:
for k,_ in pairs(self._walls) do
if self._walls[k]>1 then table.insert(prio2, k)
else table.insert(prio1, k) end
end
This more or less defeats the point of having a seedable RNG. Most likely also a problem in rot.js since iteration order of JS for..in construct is similarly undefined (per spec, but maybe some implementations are more predictable).
Fixing this would likely also fix #36, since pairs is mostly used to iterate over tables with x..','..y keys.
Use of
pairs
causes some map generators to be non-deterministic. Iteration order of pairs is undefined, so code like this won't give the same result every time it's run:This more or less defeats the point of having a seedable RNG. Most likely also a problem in rot.js since iteration order of JS
for..in
construct is similarly undefined (per spec, but maybe some implementations are more predictable).Fixing this would likely also fix #36, since
pairs
is mostly used to iterate over tables withx..','..y
keys.