start refactoring #represent_board_state