rename solidLine to notEmptyLine (#362)
Co-authored-by: MrZ_26 <1046101471@qq.com>
This commit is contained in:
@@ -173,7 +173,7 @@ end
|
||||
function generateLine(hole)
|
||||
return 1023-2^(hole-1)
|
||||
end
|
||||
function solidLine(L)
|
||||
function notEmptyLine(L)
|
||||
for i=1,10 do
|
||||
if L[i]>0 then
|
||||
return true
|
||||
@@ -184,17 +184,17 @@ function setField(P,page)
|
||||
local F=FIELD[page]
|
||||
local height=0
|
||||
for y=#F,1,-1 do
|
||||
if solidLine(F[y])then
|
||||
if notEmptyLine(F[y])then
|
||||
height=y
|
||||
break
|
||||
end
|
||||
end
|
||||
local t=P.showTime*3
|
||||
for y=1,height do
|
||||
local solid=solidLine(F[y])
|
||||
P.field[y]=FREEROW.get(0,solid)
|
||||
local notEmpty=notEmptyLine(F[y])
|
||||
P.field[y]=FREEROW.get(0,notEmpty)
|
||||
P.visTime[y]=FREEROW.get(t)
|
||||
if solid then
|
||||
if notEmpty then
|
||||
for x=1,10 do
|
||||
P.field[y][x]=F[y][x]
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ return{
|
||||
applyCustomGame()
|
||||
|
||||
for y=1,20 do
|
||||
if solidLine(FIELD[1][y])then
|
||||
if notEmptyLine(FIELD[1][y])then
|
||||
--Switch clear sprint mode on
|
||||
GAME.modeEnv.dropPiece=require'parts.eventsets.checkClearBoard'.dropPiece
|
||||
goto BREAK_clearMode
|
||||
|
||||
Reference in New Issue
Block a user