How to use the drama.BusinessOwnerRivalry function in drama

To help you get started, we’ve selected a few drama examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github james-owen-ryan / talktown / drama.py View on Github external
def _excavate_business_owner_rivalries(self):
        """Recognize cases where mutual animosity exists between owners of rival businesses."""
        business_owner_rivalries = []
        for company in self.simulation.town.companies:
            for rival_company in self.simulation.town.businesses_of_type(business_type=company.__class__.__name__):
                if rival_company is not company and rival_company.owner and company.owner:
                    if not company.owner.person.likes(rival_company.owner.person):
                        if not rival_company.owner.person.likes(company.owner.person):
                            subjects = (company.owner.person, rival_company.owner.person)
                            if not any(br for br in self.business_owner_rivalries if set(br.subjects) == set(subjects)):
                                business_owner_rivalries.append(BusinessOwnerRivalry(subjects=subjects))
        return business_owner_rivalries

drama

Delft Radar Modelling and perfornance Analysis (DRaMA)

GPL-3.0
Latest version published 1 year ago

Package Health Score

41 / 100
Full package analysis

Similar packages