减少内部next到十个

This commit is contained in:
MrZ626
2021-10-12 19:31:22 +08:00
parent 0d292446a2
commit c5551a1b64
2 changed files with 12 additions and 12 deletions

View File

@@ -460,7 +460,7 @@ local function _drawNext(P,repMode)
gc_translate(50,-28)
local blockImg=TEXTURE.miniBlock
local n=N
while n<=12 and queue[n]do
while n<=10 and queue[n]do
local id=queue[n].id
local _=minoColor[queue[n].color]
gc_setColor(_[1],_[2],_[3],.26)

View File

@@ -8,7 +8,7 @@ local seqGenerators={
local len=#seq0
local bag={}
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
if #bag==0 then
for i=1,len do
bag[i]=seq0[len-i+1]
@@ -44,7 +44,7 @@ local seqGenerators={
end
bag={}
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
if #bag==0 then
for i=1,len do
bag[i]=seq0[len-i+1]
@@ -61,7 +61,7 @@ local seqGenerators={
local hisLen=math.ceil(len*.5)
local history=TABLE.new(0,hisLen)
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
local r
for _=1,hisLen do--Reroll up to [hisLen] times
r=rndGen:random(len)
@@ -124,7 +124,7 @@ local seqGenerators={
end
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
-- print"======================"
--Pick a mino from pool
local tryTime=0
@@ -160,7 +160,7 @@ local seqGenerators={
local weight=TABLE.new(0,len)
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
local maxK=1
for i=1,len do
weight[i]=weight[i]*.5+rndGen:random()
@@ -178,7 +178,7 @@ local seqGenerators={
if #seq0==1 then
local i=seq0[1]
while true do
while #P.nextQueue<12 do P:getNext(i)end
while #P.nextQueue<10 do P:getNext(i)end
yield()
end
else
@@ -186,7 +186,7 @@ local seqGenerators={
local len=#seq0
local last=0
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
local r=rndGen:random(len-1)
if r>=last then
r=r+1
@@ -201,7 +201,7 @@ local seqGenerators={
mess=function(P,seq0)
local rndGen=P.seqRND
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
P:getNext(seq0[rndGen:random(#seq0)])
end
yield()
@@ -211,7 +211,7 @@ local seqGenerators={
local rndGen=P.seqRND
local bufferSeq,bag={},{}
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
if #bag==0 then
for i=1,#seq0 do bufferSeq[i]=seq0[i]end
repeat
@@ -235,7 +235,7 @@ local seqGenerators={
local len=#seq0
local bag={}
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
if #bag==0 then
for i=1,len do
bag[i]=seq0[len-i+1]
@@ -252,7 +252,7 @@ local seqGenerators={
ins(seq,seq0[i])
end
while true do
while #P.nextQueue<12 do
while #P.nextQueue<10 do
if seq[1]then
P:getNext(rem(seq))
else