Use enums.
Parametrize more hardcoded contants.
Document internal APIs.
Fix another hardcored 9x9-board hardcoded value.