java编写天天爱消除"/>
用java编写天天爱消除
[Java] 纯文本查看 复制代码--下面填写你的设备
local Shebei = "i5"
local fb
if Shebei == "i4" then
fb = "640x960"
elseif Shebei == "i5" then
fb = "640x1136"
elseif Shebei == "ipad4" then
fb = "1536x2048"
end
SCREEN_RESOLUTION=fb
SCREEN_COLOR_BITS=32
function main()
mSleep(10)
dedly = 2
local Cs --定义初始坐标
local cha -- 定义坐标差
if Shebei == "i4" then
Cs = {50,260}
cha = 90
elseif Shebei == "ipad4" then
Cs = {225,575}
cha = 180
elseif Shebei == "i5" then
Cs = {225,575}
cha = 90
end
local pos = {}
local ss = 1
local aa = 1
for i = Cs[1],(Cs[1]+Cs[1]*cha),cha do
pos[ss] = {}
aa = 1
for z = Cs[2] ,(Cs[2]+Cs[2]*cha),cha do
pos[ss][aa] = {i,z}
aa = aa + 1
end
ss = ss + 1
end
while true do
for i = 1 , 7 do
for z = 1 , 6 do
mSleep(dedly)
touchDown(0, pos[i][z][1], pos[i][z][2])
mSleep(dedly)
touchMove(0, pos[i][z+1][1], pos[i][z+1][2])
touchUp(0)
end
end
for i = 1 , 7 do
for z = 1 , 6 do
mSleep(dedly)
touchDown(0, pos[z][i][1], pos[z][i][2])
mSleep(dedly)
touchMove(0, pos[z+1][i][1], pos[z+1][i][2])
touchUp(0)
end
end
for i = 7 , 1 ,-1 do
for z = 7 , 2 ,-1 do
mSleep(dedly)
touchDown(0, pos[i][z][1], pos[i][z][2])
mSleep(dedly)
touchMove(0, pos[i][z-1][1], pos[i][z-1][2])
touchUp(0)
end
end
for i = 7 , 1 ,-1 do
for z = 7 , 2 ,-1 do
mSleep(dedly)
touchDown(0, pos[z][i][1], pos[z][i][2])
mSleep(dedly)
touchMove(0, pos[z-1][i][1], pos[z-1][i][2])
touchUp(0)
end
end
end
end
更多推荐
用java编写天天爱消除
发布评论