整理代码,goto标签名字统一格式方便理解
This commit is contained in:
@@ -40,11 +40,11 @@ local function checkBoard(b,p)
|
||||
for i=1,8 do
|
||||
for j=1,3 do
|
||||
if b[lines[i][j]]~=p then
|
||||
goto nextLine
|
||||
goto CONTINUE_testNextLine
|
||||
end
|
||||
end
|
||||
do return true end
|
||||
::nextLine::
|
||||
::CONTINUE_testNextLine::
|
||||
end
|
||||
end
|
||||
local function full(L)
|
||||
|
||||
@@ -71,21 +71,21 @@ function scene.keyDown(key)
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local args=SPLITSTR(str:sub((str:find(":")or 0)+1),"!")
|
||||
if #args<4 then goto fail end
|
||||
if #args<4 then goto THROW_fail end
|
||||
if not(
|
||||
pasteQuestArgs(args[1])and
|
||||
pasteSequence(args[2])and
|
||||
pasteMission(args[3])
|
||||
)then goto fail end
|
||||
)then goto THROW_fail end
|
||||
repeat table.remove(FIELD)until #FIELD==0
|
||||
FIELD[1]=newBoard()
|
||||
for i=4,#args do
|
||||
if not pasteBoard(args[i],i-3)and i<#args then goto fail end
|
||||
if not pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end
|
||||
end
|
||||
freshMiniFieldVisible()
|
||||
LOG.print(text.importSuccess,COLOR.green)
|
||||
do return end
|
||||
::fail::LOG.print(text.dataCorrupted,COLOR.red)
|
||||
::THROW_fail::LOG.print(text.dataCorrupted,COLOR.red)
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
else
|
||||
|
||||
@@ -211,12 +211,12 @@ function scene.keyDown(key)
|
||||
local F=FIELD[page]
|
||||
for i=20,1,-1 do
|
||||
for j=1,10 do
|
||||
if F[i][j]<=0 then goto nextLine end
|
||||
if F[i][j]<=0 then goto CONTINUE_notFull end
|
||||
end
|
||||
SYSFX.newShade(3,200,660-30*i,300,30)
|
||||
SYSFX.newRectRipple(3,200,660-30*i,300,30)
|
||||
rem(F,i)
|
||||
::nextLine::
|
||||
::CONTINUE_notFull::
|
||||
end
|
||||
if #F~=20 then
|
||||
repeat
|
||||
|
||||
@@ -80,12 +80,12 @@ function scene.touchMove()
|
||||
if B.ava then
|
||||
for i=1,#L,2 do
|
||||
if(L[i]-B.x)^2+(L[i+1]-B.y)^2<=B.r^2 then
|
||||
goto continue
|
||||
goto CONTINUE_nextKey
|
||||
end
|
||||
end
|
||||
PLAYERS[1]:releaseKey(n)
|
||||
end
|
||||
::continue::
|
||||
::CONTINUE_nextKey::
|
||||
end
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
|
||||
@@ -61,12 +61,12 @@ function scene.touchMove()
|
||||
if B.ava then
|
||||
for i=1,#L,2 do
|
||||
if(L[i]-B.x)^2+(L[i+1]-B.y)^2<=B.r^2 then
|
||||
goto continue
|
||||
goto CONTINUE_nextKey
|
||||
end
|
||||
end
|
||||
PLAYERS[1]:releaseKey(n)
|
||||
end
|
||||
::continue::
|
||||
::CONTINUE_nextKey::
|
||||
end
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
|
||||
Reference in New Issue
Block a user