asteroid-automator/main.py
Martysh12 555ecfa7a3 Added newlines and sorted imports
Added newlines and sorted imports according to PEP-8.
2021-12-19 20:18:07 +02:00

26 lines
542 B
Python

import os
import pyautogui
if os.name == "windows":
import d3dshot
class AutomatableGame:
def __init__(self):
self.loc = pyautogui.locateOnScreen("images/app.png")
def fetch_sshot(self):
return pyautogui.screenshot(region=self.loc)
def send_key(self, key):
pass
class AutomatableGame__Windows(AutomatableGame):
def __init__(self):
super().__init__(self)
self.d = d3dshot.create()
def fetch_sshot(self):
return d.screenshot() # Cut this to self.loc(x, y, w, h)