refactoring to game base class

This commit is contained in:
2022-10-17 17:11:56 +02:00
parent 433170b4c8
commit 14a5983d17
22 changed files with 47 additions and 422 deletions

15
mine.py
View File

@@ -1,20 +1,12 @@
from config_file import UserConfigs
import cv2 as cv
from utils import dig_point, check_for_ok_button
from window_capture import WindowCapture
from vision import Vision
from game_base_class import GameBase
class Mine:
class Mine(GameBase):
def __init__(self, overlay):
self.overlay = overlay
self.config = UserConfigs()
self.capture_window = WindowCapture(None, "screen_conf", self.config)
# initialize the StunVision class
self.vision_stun = Vision()
super().__init__(overlay)
self.level = 1
@@ -39,6 +31,7 @@ class Mine:
if self.overlay.run_mode == 'stopped':
return
dig_point(290, 100, 200)
self.reset()
self.execute_loop()
def execute_loop(self):