Fix incorrect calculations of positions that uses get_board_dimension().

Current implementation actually doesn't need get_board_dimension(), so
it was deleted.
Support continuous flipping panels.