rename solidLine to notEmptyLine (#362)

Co-authored-by: MrZ_26 <1046101471@qq.com>
This commit is contained in:
Imple Lee
2021-10-06 17:23:38 +08:00
committed by GitHub
parent 54447e187a
commit 3060d89ed4
2 changed files with 6 additions and 6 deletions

View File

@@ -173,7 +173,7 @@ end
function generateLine(hole) function generateLine(hole)
return 1023-2^(hole-1) return 1023-2^(hole-1)
end end
function solidLine(L) function notEmptyLine(L)
for i=1,10 do for i=1,10 do
if L[i]>0 then if L[i]>0 then
return true return true
@@ -184,17 +184,17 @@ function setField(P,page)
local F=FIELD[page] local F=FIELD[page]
local height=0 local height=0
for y=#F,1,-1 do for y=#F,1,-1 do
if solidLine(F[y])then if notEmptyLine(F[y])then
height=y height=y
break break
end end
end end
local t=P.showTime*3 local t=P.showTime*3
for y=1,height do for y=1,height do
local solid=solidLine(F[y]) local notEmpty=notEmptyLine(F[y])
P.field[y]=FREEROW.get(0,solid) P.field[y]=FREEROW.get(0,notEmpty)
P.visTime[y]=FREEROW.get(t) P.visTime[y]=FREEROW.get(t)
if solid then if notEmpty then
for x=1,10 do for x=1,10 do
P.field[y][x]=F[y][x] P.field[y][x]=F[y][x]
end end

View File

@@ -5,7 +5,7 @@ return{
applyCustomGame() applyCustomGame()
for y=1,20 do for y=1,20 do
if solidLine(FIELD[1][y])then if notEmptyLine(FIELD[1][y])then
--Switch clear sprint mode on --Switch clear sprint mode on
GAME.modeEnv.dropPiece=require'parts.eventsets.checkClearBoard'.dropPiece GAME.modeEnv.dropPiece=require'parts.eventsets.checkClearBoard'.dropPiece
goto BREAK_clearMode goto BREAK_clearMode