Giter Club home page Giter Club logo

wx_jump's Introduction

WX_jump

  • 微信跳一跳 非原创,根据看别人教程学习开发思路,记录一下方便日后自己查看

大致思路

  • 现在主函数列出实现步骤的方法,方法里可能有哪些参数,再分别取定义各个实现方法
  • 1.先读取配置config
  • 2.进行截图
  • 3.分析截图里棋子跟棋盘的位置
  • 4.根据位置算出距离,按压系数没在代码里实现 应该是通过不断调试得出
  • 5.实现调的方法

准备阶段

  • 1.配置adb环境,具体百度
  • 手机连接电脑,cmd输入adb devices可看到手机设备ID即可
  • 2.安装模块,里面用到的有
  • from concurrent.futures import process
  • from PIL import Image
  • import json
  • import os
  • import random
  • import subprocess
  • import time
  •   import re
  • 3.里面会用到一下adb shell命令,可先大致了解

实现阶段

  • 1.adb shell wm size 获取手机屏幕分辨率 adb shell screencap -p 实现截图  adb shell input swipe {x1} {y1} {x2} {y2} {duration} 屏幕按压的操作
  • 2.文件读取操作  with open() as f:
  • 3.代码中的难点在扫描棋子跟棋盘部分,有多个for循环 理解好这个,剩下的基本OK

wx_jump's People

Contributors

afantishui avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  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.