# game-analyst-agent Makefile
# 用法：make install | make doctor | make explore GAME=my_garden

.PHONY: install doctor explore status report init clean help

GAME ?= my_garden
DEVICE ?=

help:
	@echo "game-analyst-agent 快捷命令"
	@echo ""
	@echo "  make install           安装依赖（pip install -e .）"
	@echo "  make doctor            检查运行环境"
	@echo "  make explore GAME=xxx  启动探索（需指定 GAME）"
	@echo "  make status  GAME=xxx  查看当前探索状态"
	@echo "  make report  GAME=xxx  重新生成最终报告"
	@echo "  make init    GAME=xxx  初始化新游戏配置"
	@echo "  make clean             清理临时文件"
	@echo ""
	@echo "示例："
	@echo "  make explore GAME=my_garden DEVICE=127.0.0.1:16384"

install:
	pip install -e ".[dev]"
	@echo "安装完成。运行 make doctor 检查环境。"

doctor:
	game-analyst doctor $(if $(DEVICE),--device $(DEVICE),)

explore:
	game-analyst explore --game $(GAME) $(if $(DEVICE),--device $(DEVICE),)

status:
	game-analyst status --game $(GAME)

report:
	game-analyst report --game $(GAME)

init:
	game-analyst init --game $(GAME)

clean:
	find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
	find . -name "*.pyc" -delete 2>/dev/null || true
	find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
	@echo "清理完成"
