sorcery  Diff

Differences From Artifact [990a6e8caf]:

To Artifact [0fb14e1ea3]:


     4      4   	for i = #list, 2, -1 do
     5      5   		local j = math.random(i)
     6      6   		list[i], list[j] = list[j], list[i]
     7      7   	end
     8      8   	return list
     9      9   end
    10     10   
    11         -fn.cshuf = function(list)
           11  +fn.scramble = function(list)
    12     12   	return fn.shuffle(table.copy(list))
    13     13   end
    14     14   
    15     15   fn.urnd = function(min,max)
    16     16   	local r = {}
    17     17   	for i=min,max do r[1 + (i - min)] = i end
    18     18   	fn.shuffle(r)
................................................................................
    27     27   			hash[v] = true
    28     28   			new[#new+1] = v
    29     29   		end
    30     30   	end
    31     31   	return new
    32     32   end
    33     33   
    34         -fn.scramble = function(list)
    35         -	local new = table.copy(list)
    36         -	fn.shuffle(new)
    37         -	return new
    38         -end
    39         -
    40     34   fn.copy = function(t)
    41     35   	local new = {}
    42     36   	for i,v in pairs(t) do new[i] = v end
    43     37   	setmetatable(new,getmetatable(t))
    44     38   	return new
    45     39   end
    46     40