def flip_single_action(action, config):
  """Actions corresponding to the field rotated by 180 degrees."""
  action = football_action_set.named_action_from_action_set(
      football_action_set.get_action_set(config), action)
  if action == football_action_set.action_left:
    return football_action_set.action_right
  if action == football_action_set.action_top_left:
    return football_action_set.action_bottom_right
  if action == football_action_set.action_top:
    return football_action_set.action_bottom
  if action == football_action_set.action_top_right:
    return football_action_set.action_bottom_left
  if action == football_action_set.action_right:
    return football_action_set.action_left
  if action == football_action_set.action_bottom_right:
    return football_action_set.action_top_left
  if action == football_action_set.action_bottom:
    return football_action_set.action_top
  if action == football_action_set.action_bottom_left:
    return football_action_set.action_top_right
  return action
Actions corresponding to the field rotated by 180 degrees.
gfootball/env/observation_rotation.py