def accept_unit(self): Location.accept_unit(self) if self.unit_in_loc is not None: if self.owner is not self.unit_in_loc.owner: self.owner = self.unit_in_loc.owner self.building.type = BuildingType.EMPTY self.unit_in_loc.set_direction(self.exit_direction[self.owner])