代码规范:把所有的tab换成空格

This commit is contained in:
MrZ626
2021-08-25 04:28:52 +08:00
parent 8f910f95f4
commit 295e79984f
271 changed files with 35384 additions and 35379 deletions

View File

@@ -1,42 +1,42 @@
local function update_round(P)
if P.stat.piece%7==0 and #PLY_ALIVE>1 then
P.control=false
local ID=P.id
repeat
ID=ID+1
if not PLAYERS[ID]then ID=1 end
until PLAYERS[ID].alive or ID==P.id
PLAYERS[ID].control=true
end
if P.stat.piece%7==0 and #PLY_ALIVE>1 then
P.control=false
local ID=P.id
repeat
ID=ID+1
if not PLAYERS[ID]then ID=1 end
until PLAYERS[ID].alive or ID==P.id
PLAYERS[ID].control=true
end
end
return{
color=COLOR.cyan,
env={
life=1,
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg='rainbow',bgm='push',
},
load=function()
PLY.newPlayer(1)
PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=1,hold=true,node=8000})
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=='win'then
local T=P.stat.piece
return
T<=7*8 and 5 or
T<=7*10 and 4 or
T<=7*15 and 3 or
T<=7*26 and 2 or
1
end
end,
color=COLOR.cyan,
env={
life=1,
drop=300,lock=300,
infHold=true,
dropPiece=update_round,
pushSpeed=15,
garbageSpeed=1e99,
bg='rainbow',bgm='push',
},
load=function()
PLY.newPlayer(1)
PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=1,hold=true,node=8000})
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=='win'then
local T=P.stat.piece
return
T<=7*8 and 5 or
T<=7*10 and 4 or
T<=7*15 and 3 or
T<=7*26 and 2 or
1
end
end,
}