Giter Site home page Giter Site logo

wechat_jump_game's Introduction

使用世界上最好的语言 来玩微信跳一跳

参考 https://github.com/wangshub/wechat_jump_game 实现的 php 版本.

环境

  • PHP-CLI
  • GIT BASH 或同等 mingw 环境
  • ADB 可以到这里下载

原理说明

  1. 将手机点击到《跳一跳》小程序界面;
  2. 用 ADB 工具获取当前手机截图,并用 ADB 将截图保存至电脑,
  • 方案一(需在 mingw 环境中执行 ,可使用 git 自带的 git bash 中执行)
   adb shell screencap -p | sed 's/\r$//' > screenshot/screen.png
  • 方案二 (命令行中执行即可 , 部分手机提示无权限)
    adb shell screencap -p /sdcard/screen.png
    adb pull /screenshot/screen.png .
  1. 逐列扫描像素点,匹配棋子位置、棋盘位置;
  2. 计算棋子与棋盘中心点位置,乘以一定的系数,得到时间;
  3. 通过 ADB ,触发操作;
    adb shell input swipe x y x y time(ms)

操作步骤(android)

  • 打开USB调试,使用 USB 线连接手机;
  • 确保执行 adb devices 可以看到设备列表;
  • 打开微信跳一跳游戏,点击开始游戏;
  • 运行php run.php

效果

  • 描点 描点

  • 分数 描点

wechat_jump_game's People

Contributors

madaima avatar

Watchers

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