sorcery  Diff

Differences From Artifact [99c5f4dbba]:

To Artifact [5997708826]:


     1      1   local fn = {}
            2  +
            3  +fn.shuffle = function(list)
            4  +	for i = #list, 2, -1 do
            5  +		local j = math.random(i)
            6  +		list[i], list[j] = list[j], list[i]
            7  +	end
            8  +end
            9  +
           10  +fn.scramble = function(list)
           11  +	local new = table.copy(list)
           12  +	fn.shuffle(new)
           13  +	return new
           14  +end
     2     15   
     3     16   fn.copy = function(t)
     4     17   	local new = {}
     5     18   	for i,v in pairs(t) do new[i] = v end
     6     19   	setmetatable(new,getmetatable(t))
     7     20   	return new
     8     21   end