How to use the drama.Rivalry 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_rivalries(self):
        """Recognize cases where mutual animosity exists between a pair of characters."""
        rivalries = []
        for person in self.simulation.town.residents:
            for other_person in person.relationships:
                if person.dislikes(other_person) and other_person.dislikes(person):
                    subjects = (person, other_person)
                    if not any(r for r in self.rivalries if set(r.subjects) == set(subjects)):
                        rivalries.append(Rivalry(subjects=subjects))
        return 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