GithubHelp home page GithubHelp logo

autominesweeper's Introduction

AutoMinesweeper

自动扫雷软件

python2

blog地址:http://home.cahhbwy.cn/index.php/2017/03/09/autominesweeper/

扫雷软件来自扫雷网Arbiter_0.52.3版

快速传送门下载扫雷

程序打开请禁用高分辨率缩放

需要python模块:numpy, pyautogui, Pillow,使用pip安装即可

此工程自另一仓库文件夹下搬运过来

示例

src/

图片参考数据,其中0~8.png和mine.png、mine_dead.png、mine_flag.png、mine_wrong、none.png为游戏中的单个块的情况,已通过采样像素的编码的方式做优化,不需要这些图像,如果更换扫雷游戏版本,需要重新采样图片进行编码。

左上.png和右下.png为确定窗口位置所用,更换游戏版本需要重新截图并调整findPanel函数中参数

ImageEncode.py,为找编码写的程序,更换游戏版本参考程序重新编码

AutoMinesweeper.py

自动扫雷单模块版,单独(加上src/左上.png、src/右下.png)可运行;新增不标雷玩法,在noFlag分支上

以下是程序的多模块版本

GlobalData.py

存储扫雷游戏全局变量

Identify.py

识别窗口位置,识别每个方块的类型

Control.py

模拟鼠标点击事件

Analysis.py

分析当前战况,做出判断

main.py

主函数

autominesweeper's People

Contributors

cahhbwy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.