mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
rolling-11
This commit is contained in:
parent
77c7dd5175
commit
faa47ab595
@ -3,7 +3,8 @@
|
|||||||
-- Fisher-Yates
|
-- Fisher-Yates
|
||||||
function shuffle(t)
|
function shuffle(t)
|
||||||
for i = 1, #t-1 do
|
for i = 1, #t-1 do
|
||||||
t[i] = t[math.random(i+1, #t)]
|
local j = math.random(i+1, #t)
|
||||||
|
t[i], t[j] = t[j], t[i]
|
||||||
end
|
end
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user