mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Merge pull request #8809 from norill/shuffle
fixed biased shuffle algorithm
This commit is contained in:
@@ -185,8 +185,8 @@
|
||||
return
|
||||
L = L.Copy()
|
||||
|
||||
for(var/i=1, i<=L.len, ++i)
|
||||
L.Swap(i,rand(1,L.len))
|
||||
for(var/i=1, i<L.len, ++i)
|
||||
L.Swap(i,rand(i,L.len))
|
||||
|
||||
return L
|
||||
|
||||
|
||||
Reference in New Issue
Block a user