How to use the drama.SiblingRivalry 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_sibling_rivalries(self):
        """Recognize cases where mutual animosity exists between a pair of siblings."""
        sibling_rivalries = []
        for person in self.simulation.town.residents:
            for sibling in person.siblings:
                if person.dislikes(sibling) and sibling.dislikes(person):
                    subjects = (person, sibling)
                    if not any(sr for sr in self.sibling_rivalries if set(sr.subjects) == set(subjects)):
                        sibling_rivalries.append(SiblingRivalry(subjects=subjects))
        return sibling_rivalries

drama

Delft Radar Modelling and perfornance Analysis (DRaMA)

GPL-3.0
Latest version published 5 months ago

Package Health Score

54 / 100
Full package analysis

Similar packages