parameters: (self, armor_class)
return_statement: return False
docstring: Checks if units in the line can execute a specific command.
  
          :param armor_class: The type of attack class searched for.
          :type armor_class: int
          :returns: True if the train location obj_id is greater than zero.
docstring_summary: Checks if units in the line can execute a specific command.
docstring_tokens: Checks if units in the line can execute a specific command .
function: def has_attack(self, armor_class):
          """
          Checks if units in the line can execute a specific command.
  
          :param armor_class: The type of attack class searched for.
          :type armor_class: int
          :returns: True if the train location obj_id is greater than zero.
          """
          head_unit = self.get_head_unit()
          attacks = head_unit["attacks"].get_value()
          for attack in attacks.values():
              type_id = attack["type_id"].get_value()
  
              if type_id == armor_class:
                  return True
  
          return False
function_tokens: def has_attack ( self , armor_class ) : head_unit = self . get_head_unit ( ) attacks = head_unit [ "attacks" ] . get_value ( ) for attack in attacks . values ( ) : type_id = attack [ "type_id" ] . get_value ( ) if type_id == armor_class : return True return False