Ludo King LDPlayer Bot (Windows)

Files:
- bot\bot.py: main automation
- bot\trainer.py: capture templates / ROI
- bot\training.txt: config + training
- bot\templates\: put template PNG files here

Quick start:
1) Install Python 3.10+ and pip if not already.
2) Install dependencies:
   py -m pip install -r bot\requirements.txt
3) Start LDPlayer instances and make sure adb can see them:
   .\adb.exe devices
4) Capture templates using trainer (window auto-fits to screen):
   py bot\trainer.py --device emulator-5554 --roi --out bot\templates\home_friends.png
   (optional size) add --fit 900x700 if the ROI window feels too big
5) Ludo King has no copy button. Use OCR for room code:
   py bot\trainer.py --device emulator-5554 --roi --print-coords --base 540x960
   (optional auto-write) py bot\trainer.py --device emulator-5554 --roi --base 540x960 --write-room-region
6) Edit bot\training.txt to reference your templates and check room_code_region.
6) Run bot:
   py bot\bot.py

Notes:
- Keep LDPlayer resolution consistent with base_resolution in bot\training.txt.
- For room code OCR, install Tesseract and set tesseract_cmd in training.txt if needed.
- OCR requires Tesseract. Install it and set tesseract_cmd if needed.
- The bot does NOT save screenshots during runtime (no disk fill risk).
- Logs per device are saved in bot\logs\.
