显示ai计算的下一块位置
This commit is contained in:
@@ -290,6 +290,10 @@ return{
|
|||||||
if result==2 then
|
if result==2 then
|
||||||
ins(keys,6)
|
ins(keys,6)
|
||||||
elseif result==0 then
|
elseif result==0 then
|
||||||
|
dest[5],dest[6]=dest[1][1],dest[1][2]
|
||||||
|
dest[7],dest[8]=dest[2][1],dest[2][2]
|
||||||
|
dest[1],dest[2]=dest[3][1],dest[3][2]
|
||||||
|
dest[3],dest[4]=dest[4][1],dest[4][2]
|
||||||
P.AI_dest=dest
|
P.AI_dest=dest
|
||||||
if hold then keys[1]=8 end--Hold
|
if hold then keys[1]=8 end--Hold
|
||||||
while move[1]do
|
while move[1]do
|
||||||
|
|||||||
@@ -622,6 +622,15 @@ function draw.norm(P)
|
|||||||
drawNextPreview(P,P.nextQueue[1])
|
drawNextPreview(P,P.nextQueue[1])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Draw AI's drop destination
|
||||||
|
if P.AI_dest then
|
||||||
|
local texture=TEXTURE.puzzleMark[21]
|
||||||
|
local L=P.AI_dest
|
||||||
|
for i=1,#L,2 do
|
||||||
|
gc_draw(texture,30*L[i],-30*L[i+1]-30)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
gc.setScissor()
|
gc.setScissor()
|
||||||
gc_pop()
|
gc_pop()
|
||||||
|
|
||||||
|
|||||||
@@ -508,11 +508,11 @@ function Player.lock(P)
|
|||||||
if CB[i][j]then
|
if CB[i][j]then
|
||||||
P.field[y][P.curX+j-1]=P.cur.color
|
P.field[y][P.curX+j-1]=P.cur.color
|
||||||
P.visTime[y][P.curX+j-1]=P.showTime
|
P.visTime[y][P.curX+j-1]=P.showTime
|
||||||
local x=P.curX+j-1
|
|
||||||
if dest then
|
if dest then
|
||||||
for k=1,#dest do
|
local x=P.curX+j--[[-1]]
|
||||||
if x==dest[k][1]+1 and y==dest[k][2]+1 then
|
for k=1,#dest,2 do
|
||||||
rem(dest,k)
|
if x==dest[k]--[[+1]]and y==dest[k+1]+1 then
|
||||||
|
rem(dest,k)rem(dest,k)
|
||||||
goto success
|
goto success
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user