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)
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

View File

@@ -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