加入c2序列模式,可以在自定义或mod中开启

This commit is contained in:
MrZ626
2021-03-15 20:47:54 +08:00
parent 459bd9ad31
commit e1d52de410
3 changed files with 22 additions and 2 deletions

View File

@@ -36,6 +36,26 @@ local sequenceModes={
yield()
end
end,
c2=function(P,seq0)
local len=#seq0
local weight={}
for i=1,len do weight[i]=0 end
while true do
while #P.nextQueue<6 do
local maxK=1
for i=1,len do
weight[i]=weight[i]*.5+P:RND()
if weight[i]>weight[maxK]then
maxK=i
end
end
weight[maxK]=weight[maxK]/3.5
P:getNext(seq0[maxK])
end
yield()
end
end,
rnd=function(P,seq0)
P:getNext(seq0[rnd(#seq0)])
while true do