Skip to content

Commit

Permalink
fixing deck randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmiglio committed Mar 24, 2024
1 parent d9365b6 commit f80bf96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/pyclashbot/bot/deck_randomization.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def randomize_deck(vm_index: int, logger: Logger) -> bool:
return False

# click on deck 2
logger.change_status("Deleting deck 2...")
logger.change_status("Randomizing deck 2...")
click(vm_index, 109, 123)

# click on deck options
Expand All @@ -167,7 +167,7 @@ def randomize_deck(vm_index: int, logger: Logger) -> bool:
# click OK
print("Clicking OK")
click(vm_index, 283, 387)
time.sleep(0.33)
time.sleep(1.33)

else:
print("Doing the regular method for deck randomization")
Expand Down
11 changes: 7 additions & 4 deletions src/pyclashbot/bot/nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,13 +1001,16 @@ def check_if_on_card_page(vm_index) -> bool:
]

colors = [
[150, 62, 4],
[165, 75, 2],
[168, 76, 3],
[83, 32, 1],
[255, 238, 230],
[232, 0, 248],
[214, 2, 226],
[173, 92, 1],
[178, 96, 1],
]

# for p in pixels:
# print(p)

for i, p in enumerate(pixels):
if not pixel_is_equal(colors[i], p, tol=15):
return False
Expand Down

0 comments on commit f80bf96

Please sign in to comment.