adapt cold-clear 45d5276

This commit is contained in:
Gompyn
2020-07-29 14:47:49 +08:00
parent 3260afcac2
commit 17d670a1ba
2 changed files with 8 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ local Timer=love.timer.getTime
local blockPos={4,4,4,4,4,5,4}
local scs={{1,2},{1,2},{1,2},{1,2},{1,2},{1.5,1.5},{0.5,2.5}}
-------------------------------------------------Cold clear
local CCblockID={4,3,6,5,1,2,0}
local CCblockID={6,5,4,3,2,1,0}
if system=="Windows"then
require("CCloader")
BOT={
@@ -29,12 +29,12 @@ if system=="Windows"then
addNext= cc.add_next_piece_async ,--(bot,piece)
update= cc.reset_async ,--(bot,field,b2b,combo)
think= cc.request_next_move ,--(bot)
getMove= cc.poll_next_move ,--(bot)success,hold,move
ifDead= cc.is_dead_async ,--(bot)dead
getMove= cc.poll_next_move ,--(bot)success,dest,hold,move
destroy= cc.destroy_async ,--(bot)
setHold= cc.set_hold ,--(opt,bool)
set20G= cc.set_20g ,--(opt,bool)
setPCLoop= cc.set_pcloop ,--(opt,bool)
setBag= cc.set_bag7 ,--(opt,bool)
setNode= cc.set_max_nodes ,--(opt,bool)
free= cc.free ,--(opt/wei)
@@ -275,9 +275,11 @@ return{
return 2
end,--start thinking
function(P,ctrl)
if BOT.ifDead(P.AI_bot)then ins(ctrl,6)return 3 end
local success,hold,move=BOT.getMove(P.AI_bot)
if success then
if success == 2 then
ins(ctrl,6)
return 3
elseif success == 0 then
if hold then ctrl[1]=8 end--Hold
while move[1]do
local m=rem(move,1)

View File

@@ -83,7 +83,7 @@ local finesseList={
finesseList[1][3],finesseList[1][4],finesseList[7][3],finesseList[7][4]=finesseList[1][1],finesseList[1][2],finesseList[7][1],finesseList[7][2]--"2-phase" SZI
finesseList[2]=finesseList[1]--S=Z
finesseList[4],finesseList[5]=finesseList[3],finesseList[3]--J=L=T
local CCblockID={4,3,6,5,1,2,0}
local CCblockID={6,5,4,3,2,1,0}
local freshPrepare={
none=NULL,
bag=function(P)