Yesterday, wechat launched a small program game: Jump jump, yesterday, the author also finished, found that this seemingly simple game to play a high score is still very difficult, requires more precise control of the press time, which is too difficult for people.
How do we as programmers play this game?
So let’s take a look at the basic gameplay of the game. It’s really simple, just touch the screen. Since we are not easy to control the long press time, so can we use the program to control, here is the Android phone solution.
1. Use ADB Screencap screenshot to get the current picture, determine the distance between the two blocks according to the position of the two blocks in the picture, so as to get the long press time (this can be done by image recognition, if it cannot be done in a short time, you can determine the time required according to experience).
Adb shell input swipe 100 100 100 100 800 adb shell input swipe 100 100 100 100 800 adb shell input swipe 100 100 100 800 adb shell input swipe 100 100 100 800
3. After a delay, go to Step 1
I estimated the time by experience value, easily got more than 100 points. Share it with everyone and try it out