How to use the drama.Misanthropy 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_misanthropes(self):
        """Recognizes cases of characters who dislike many other characters."""
        misanthropes = []
        threshold_for_misanthropy = self.simulation.config.minimum_number_of_disliked_people_to_be_misanthrope
        for person in self.simulation.town.residents:
            number_of_disliked_people = len([p for p in person.relationships if person.dislikes(p)])
            if number_of_disliked_people >= threshold_for_misanthropy:
                misanthropes.append(Misanthropy(subjects=(person,)))
        return misanthropes

drama

Delft Radar Modelling and perfornance Analysis (DRaMA)

GPL-3.0
Latest version published 11 months ago

Package Health Score

50 / 100
Full package analysis

Similar packages