Added newlines and sorted imports
Added newlines and sorted imports according to PEP-8.
This commit is contained in:
parent
3f9af5012c
commit
555ecfa7a3
12
main.py
12
main.py
|
@ -1,13 +1,15 @@
|
||||||
import pyautogui
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
if os.name == 'windows':
|
import pyautogui
|
||||||
|
|
||||||
|
if os.name == "windows":
|
||||||
import d3dshot
|
import d3dshot
|
||||||
|
|
||||||
|
|
||||||
class AutomatableGame:
|
class AutomatableGame:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.loc = pyautogui.locateOnScreen("images/app.png")
|
self.loc = pyautogui.locateOnScreen("images/app.png")
|
||||||
|
|
||||||
def fetch_sshot(self):
|
def fetch_sshot(self):
|
||||||
return pyautogui.screenshot(region=self.loc)
|
return pyautogui.screenshot(region=self.loc)
|
||||||
|
|
||||||
|
@ -19,6 +21,6 @@ class AutomatableGame__Windows(AutomatableGame):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(self)
|
super().__init__(self)
|
||||||
self.d = d3dshot.create()
|
self.d = d3dshot.create()
|
||||||
|
|
||||||
def fetch_sshot(self):
|
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)
|
||||||
|
|
Loading…
Reference in New Issue