def _go_marker_to_int(go_marker, board_size):
  """Convert GoMarkerAction into GoPoint integer encoding of move.

  Args:
    go_marker: GoMarkerAction.
    board_size: Board size of the go board (e.g. 9 or 19).

  Returns:
    GoPoint int value.
  """
  if go_marker.pass_action:
    return board_size * board_size
  else:
    return int((go_marker.row) * board_size + go_marker.col)