def check_continue_and_end(action):
  """
    Checks if an action should continue, and if it should not, ends the action

    action:
      The action to check

    return:
      False when the action is over
      True when the action should continue
  """
  if action.is_over():
    action.end()
    return False
  else:
    return True