refactoring
bug fix equip multi
This commit is contained in:
9
crops.py
9
crops.py
@@ -126,7 +126,8 @@ class Crops(GameBase):
|
||||
color_list = [PURPLE, BLUE, RED, YELLOW, GREEN]
|
||||
random.shuffle(color_list)
|
||||
self.set_color_order(color_list)
|
||||
self.current_strategy = random.choice([RAINBOW_STRATEGY, BIGBOMB_STRATEGY, ROCKET_STRATEGY, BOMB_STRATEGY])
|
||||
self.current_strategy = random.choice([RAINBOW_STRATEGY, BIGBOMB_STRATEGY,
|
||||
ROCKET_STRATEGY, BOMB_STRATEGY])
|
||||
self.reset_counter = 0
|
||||
return
|
||||
else:
|
||||
@@ -256,7 +257,8 @@ class Crops(GameBase):
|
||||
self.execute_move(res_dic[key])
|
||||
break
|
||||
|
||||
def convert_moves_to_dic_by_color(self, reserve_moves):
|
||||
@staticmethod
|
||||
def convert_moves_to_dic_by_color(reserve_moves):
|
||||
dic = {}
|
||||
for color, move in reserve_moves:
|
||||
if color in dic:
|
||||
@@ -295,7 +297,8 @@ class Crops(GameBase):
|
||||
pydirectinput.mouseUp()
|
||||
cv.waitKey(50)
|
||||
|
||||
def get_directions_array(self, current_x, current_y):
|
||||
@staticmethod
|
||||
def get_directions_array(current_x, current_y):
|
||||
left_x = current_x
|
||||
left_y = current_y - 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user