Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More efficient bot changes #20

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

GotEmCoach
Copy link

Not completely finished but wanted to get the PR up for others

brimdor and others added 10 commits December 6, 2023 12:28
- updated main.py to handle errors without crashing.
- errors are reported on screen. Specifically when an image could not be located with sufficient confidence
- retook a ton of screenshots to help with the collection
- warning - shutdown screenshots can sometimes trigger clicks in the wrong areas on the main view. Adjust those screenshots to your liking.
- added .5 second sleep after successful image finds
- added more console prompts to inform whats happening
- Windows 10/11 compatible only
- Not Mac tested yet
- no longer needs powershell to achieve elevated permissions
- must use a powershell terminal in order to run
- added a variable to pick specific window by name
- all dependencies updated in requirements
- added a script to auto update the dependencies versioning in requirements.txt based on the currently installed versions. Only use this if the dependencies are working in their current version and it is listed in the requirements already.
- adjust readme to point out using the python command rather than running start.ps1. Powershell terminal is still required but it uses only 1 script now.
- added more screenshots to improve image finding
@GotEmCoach
Copy link
Author

Turns out pygetwindow also has a method to resize the emulator window it grabs which is perfect for standardizing the images so that they match every time. I've added the capability of essentially being able to screenshot the emulator line (running the script once will put the multi-instance manager into the right dimensions for taking that screenshot) corresponding to one of monopoly bots in bots.json. You save that screenshot in the same way it's dimensioned below and it should be able to turn on the emulator, click the app and continue from there.

The end process occurs when keep-rolling shows up and will move into the build category, when it reaches the keep-building screen it's going to close the phone and essentially the next phone will be worked on. I've got to work on that logic so it can check back if it got dice or not after completing a board.
optimisticcarp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants