日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

matlab 自动扫雷,MATLAB自动扫雷(2)——排雷插旗

發布時間:2024/10/14 循环神经网络 135 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlab 自动扫雷,MATLAB自动扫雷(2)——排雷插旗 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

如果周圍8個方塊和當中數字判斷周圍有空白方塊

% 點擊白塊

function click_blank()

global map

global blocks_x

global blocks_y

global left

global top

global block_width

global block_height

showmap();

iscluck = 0;

for y=1:blocks_y

for x=1:blocks_x

if (1 <= map(x,y)) && (map(x,y) <= 8)

boom_number = map(x,y);

block_white = 0;

block_qi = 0;

for yy=(y - 1):(y + 1)

for xx=(x - 1):(x + 1)

if (1 <= yy) && (1 <= xx) && (yy <= blocks_y) && (xx <= blocks_x)

if ~((yy == y) && (xx == x))

if map(xx,yy) == 0

block_white = block_white +1;

elseif map(xx,yy) == -4

block_qi = block_qi +1;

end

end

end

end

end

if boom_number == block_qi && block_white > 0

for yy=(y - 1):(y + 1)

for xx=(x - 1):(x + 1)

if (1 <= yy) && (1 <= xx) && (yy <= blocks_y) && (xx <= blocks_x)

if ~((yy == y) && (xx == x))

if map(xx,yy) == 0

disp("點開")

win.setMouse(left + (xx-1) * block_width+5,...

top + (yy-1) * block_height+5);

win.leftClick;

iscluck = 1;

end

end

end

end

end

end

end

end

end

if iscluck == 0 && ~all(all(map~=0))

luck();

end

win.setMouse(50,50);

end

總結

以上是生活随笔為你收集整理的matlab 自动扫雷,MATLAB自动扫雷(2)——排雷插旗的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。