def get_enemy_encryptors(self, game_state):
global his_locations
encryptor_locations = []
for location in his_locations:
unit = game_state.contains_stationary_unit(location)
if unit.unit_type == ENCRYPTOR:
encryptor_locations.append(location)
return encryptor_locations
thats my code and this is the error I’m getting:
‘bool’ object has no attribute ‘unit_type’
I was sure this works, why doesn’t it? Can anyone help?
the variable “his_locations” is just a list of the locations on my opponents side