ClashRoyaleBuildABot icon indicating copy to clipboard operation
ClashRoyaleBuildABot copied to clipboard

Enhanced Game Restart Logic and GUI Introduction

Open Leviaria opened this issue 9 months ago • 3 comments

This update introduces several key improvements to ClashRoyaleBuildABot

1. Enhanced Game Restart Logic:

  • The bot now intelligently handles scenarios where reward screens or menus might appear after a match, waiting for a specific duration before attempting to detect the "Battle" button.
  • If the button remains undetected, the game is automatically restarted using ADB commands to ensure uninterrupted gameplay.

2. New GUI (Graphical User Interface):

  • A new GUI has been added to the bot, optimized for Windows 11 terminals.
  • The GUI functions smoothly on Windows 10 as well, with a few minor visual differences.
  • Settings customization and further optimizations are planned for future updates.
  • The GUI provides improved text clarity, and in DEBUG mode, previously hidden information can be viewed without impacting performance.

GUI image

Have Fun! :)

Leviaria avatar May 15 '24 20:05 Leviaria

This is awesome man. Great work :D

I'm tempted to go back and try and fix the various machine learning components now, I haven't looked at the code properly for a very long time.

Pbatch avatar May 15 '24 21:05 Pbatch

When this is done I'll make sure the demo video makes it to the README

Pbatch avatar May 15 '24 21:05 Pbatch

Enhance Logging with Loguru Integration

This 3 changes replaces the basic print statements with Loguru.

This enhancement provides:

  • Structured Logging: Logs are organized with timestamps, levels (e.g., INFO, DEBUG, ERROR), and clear messages for easier debugging and analysis.

  • Customizable Log Files: Log files are now saved in the clashroyalebuildabot/logs directory with timestamps, making it easier to track bot activity over time.

Additional optimizations are planned for this evening to further streamline the code while maintaining its current efficiency.

image

Leviaria avatar May 16 '24 15:05 Leviaria

I've separated your code into windows_main.py so that Mac/Linux users still have something to run.

@all-contributors please add @Leviaria for code, examples and tutorials.

Pbatch avatar May 21 '24 18:05 Pbatch

@Pbatch

I've put up a pull request to add @Leviaria! :tada:

allcontributors[bot] avatar May 21 '24 18:05 allcontributors[bot]