diff --git a/pyclashbot/bot/constants.py b/pyclashbot/bot/constants.py new file mode 100644 index 000000000..26b0c9355 --- /dev/null +++ b/pyclashbot/bot/constants.py @@ -0,0 +1 @@ +CLASH_MAIN_DEADSPACE_COORD = (35, 500) diff --git a/pyclashbot/bot/fight.py b/pyclashbot/bot/fight.py index d4833d943..60e66d5b1 100644 --- a/pyclashbot/bot/fight.py +++ b/pyclashbot/bot/fight.py @@ -11,6 +11,7 @@ get_play_coords_for_card, switch_side, ) +from pyclashbot.bot.constants import CLASH_MAIN_DEADSPACE_COORD from pyclashbot.bot.nav import ( check_for_in_battle_with_delay, check_for_trophy_reward_menu, @@ -58,7 +59,6 @@ (243, 469), (308, 470), ] -CLASH_MAIN_DEADSPACE_COORD = (20, 520) ELIXIR_COORDS = [ [613, 149], [613, 165], diff --git a/pyclashbot/bot/nav.py b/pyclashbot/bot/nav.py index 05aa27ead..5b4497e49 100644 --- a/pyclashbot/bot/nav.py +++ b/pyclashbot/bot/nav.py @@ -2,6 +2,7 @@ import time from typing import Literal +from pyclashbot.bot.constants import CLASH_MAIN_DEADSPACE_COORD as CLASH_MAIN_MENU_DEADSPACE_COORD from pyclashbot.detection.image_rec import ( all_pixels_are_equal, find_image, @@ -15,7 +16,6 @@ CARD_PAGE_ICON_FROM_CLASH_MAIN = (108, 598) CARD_PAGE_ICON_FROM_CARD_PAGE = (147, 598) OK_BUTTON_COORDS_IN_TROPHY_REWARD_PAGE = (209, 599) -CLASH_MAIN_MENU_DEADSPACE_COORD = (32, 520) CLASH_MAIN_WAIT_TIMEOUT = 240 # s diff --git a/pyclashbot/bot/states.py b/pyclashbot/bot/states.py index ce3feb5b7..78f5d1b56 100644 --- a/pyclashbot/bot/states.py +++ b/pyclashbot/bot/states.py @@ -49,8 +49,6 @@ def handle_state_failure(logger: Logger, state_name: str, function_name: str, er mode_used_in_1v1 = None fight_mode_cycle_index = 0 -CLASH_MAIN_DEADSPACE_COORD = (20, 520) - def get_next_fight_mode(job_list): """Get the next fight mode to use, cycling through enabled modes.""" diff --git a/pyclashbot/emulators/google_play.py b/pyclashbot/emulators/google_play.py index d0c0c8b3e..d24fb65a7 100644 --- a/pyclashbot/emulators/google_play.py +++ b/pyclashbot/emulators/google_play.py @@ -7,13 +7,13 @@ import psutil -DEBUG = False - from pyclashbot.bot.nav import check_if_on_clash_main_menu from pyclashbot.emulators.adb_base import AdbBasedController from pyclashbot.utils.cancellation import interruptible_sleep from pyclashbot.utils.platform import Platform +DEBUG = False + class GooglePlayEmulatorController(AdbBasedController): supported_platforms = [Platform.WINDOWS]