Refactor ai.py: decompose choose_swap_or_discard and extract utilities

Break the 666-line choose_swap_or_discard into 8 focused sub-functions,
extract named constants for ~15 magic numbers, add column/pair utility
functions (iter_columns, project_score, count_hidden, hidden_positions),
and extract _log_cpu_action helper to reduce logging boilerplate in
process_cpu_turn. No behavior changes - validated with simulate.py 500.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken 2026-02-14 09:31:37 -05:00
parent 8431cd6fd1
commit 9bb9d1e397

File diff suppressed because it is too large Load Diff