Refactor board to puzzle