Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyclashbot/bot/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CLASH_MAIN_DEADSPACE_COORD = (35, 500)
2 changes: 1 addition & 1 deletion pyclashbot/bot/fight.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -58,7 +59,6 @@
(243, 469),
(308, 470),
]
CLASH_MAIN_DEADSPACE_COORD = (20, 520)
ELIXIR_COORDS = [
[613, 149],
[613, 165],
Expand Down
2 changes: 1 addition & 1 deletion pyclashbot/bot/nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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


Expand Down
2 changes: 0 additions & 2 deletions pyclashbot/bot/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions pyclashbot/emulators/google_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading