Added newlines and sorted imports

Added newlines and sorted imports according to PEP-8.
This commit is contained in:
Martysh12 2021-12-19 20:18:07 +02:00
parent 3f9af5012c
commit 555ecfa7a3
1 changed files with 7 additions and 5 deletions

12
main.py
View File

@ -1,13 +1,15 @@
import pyautogui
import os
if os.name == 'windows':
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)
@ -19,6 +21,6 @@ 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)
return d.screenshot() # Cut this to self.loc(x, y, w, h)