fixed instance bug with member variables
This commit is contained in:
25
crops.py
25
crops.py
@@ -41,19 +41,6 @@ ROCKET_STRATEGY = 7
|
||||
BOMB_STRATEGY = 5
|
||||
|
||||
class Crops:
|
||||
data_value_grid = []
|
||||
data_coordinates = []
|
||||
screenshot = []
|
||||
next_level = cv.imread("crop/next_level.jpg", cv.IMREAD_COLOR)
|
||||
next_level_x = cv.imread("crop/next_level_x.jpg", cv.IMREAD_COLOR)
|
||||
reset_board = cv.imread("crop/reset_button.jpg", cv.IMREAD_COLOR)
|
||||
reset_confirm = cv.imread("crop/reset_confirm.jpg", cv.IMREAD_COLOR)
|
||||
reset_counter = 0
|
||||
colors_at_standard = True
|
||||
needles = {}
|
||||
hsh_needles = {}
|
||||
explosives = [RAINBOW, ARROW_RIGHT, ARROW_DOWN, BIGBOMB, BOMB]
|
||||
colors = [GREEN, YELLOW, RED, BLUE, PURPLE, MAGINENT, CHEMTRANT, TENESENT, CIBUTRANT, ARTISENT]
|
||||
|
||||
def __init__(self, overlay):
|
||||
self.overlay = overlay
|
||||
@@ -62,6 +49,18 @@ class Crops:
|
||||
self.data_score_map = np.zeros((8, 14), dtype=int)
|
||||
self.observation = np.zeros((8, 14), dtype=int)
|
||||
|
||||
self.screenshot = []
|
||||
self.next_level = cv.imread("crop/next_level.jpg", cv.IMREAD_COLOR)
|
||||
self.next_level_x = cv.imread("crop/next_level_x.jpg", cv.IMREAD_COLOR)
|
||||
self.reset_board = cv.imread("crop/reset_button.jpg", cv.IMREAD_COLOR)
|
||||
self.reset_confirm = cv.imread("crop/reset_confirm.jpg", cv.IMREAD_COLOR)
|
||||
self.reset_counter = 0
|
||||
self.colors_at_standard = True
|
||||
self.needles = {}
|
||||
self.hsh_needles = {}
|
||||
self.explosives = [RAINBOW, ARROW_RIGHT, ARROW_DOWN, BIGBOMB, BOMB]
|
||||
self.colors = [GREEN, YELLOW, RED, BLUE, PURPLE, MAGINENT, CHEMTRANT, TENESENT, CIBUTRANT, ARTISENT]
|
||||
|
||||
self.current_strategy = RAINBOW_STRATEGY
|
||||
|
||||
# 230 to 2110 = 1883 / 14 = 134.5
|
||||
|
||||
Reference in New Issue
Block a user