def mkNight(self): for votee in self.votees: if (len(self.votees[votee]) >= (len(self.voters) / 2 + 1)): deadp = votee if (deadp == "NL"): self.deadp = None self.announce("It is now night. Zzz...") Game.mkNight(self) return elif (deadp.role == "Jester"): self.announce("The Jester, " + self.get_role("Jester") + " has gotten himself lynched! Jester win!") self.game_over() elif ((deadp.role != "SJ") and (len(self.voters) <= 2)): self.announce("The Serial Jester, " + self.get_role("SJ") + ", has gained dominance over the town! Town win!") elif (deadp.role == "SJ"): self.announce("The town has lynched the Serial Jester! Serial Jester win!") if (self.get_role("Jester") != None): self.announce("Jester was " + self.get_role("Jester") + ".") else: self.deadp = deadp self.deadp_name = self.names[deadp] self.removePlayer(self.names[deadp]) self.announce("It is now night. Zzz...") Game.mkNight(self) return self.game_over()
def mkNight(self): for votee in self.votees: if (len(self.votees[votee]) >= (len(self.voters) / 2 + 1)): deadp = votee if (deadp == "NL"): self.deadp = None self.announce("It is now night. Zzz...") Game.mkNight(self) return elif (deadp.role == "Lynchee"): self.announce("The Lyncher, " + self.get_role("Lyncher") + " has gotten his target lynched! Lyncher win!") self.game_over() elif ((deadp.role != "SK") and (len(self.voters) <= 3)): self.announce("The mafia, " + self.get_role("SK") + ", has gained dominance over the town! Mafia win!") elif (deadp.role == "SK"): self.announce("The town has lynched the mafia! Town win!") if (self.get_role("Lyncher") != None): self.announce("Lyncher was " + self.get_role("Lyncher") + ".") self.announce("Lynchee was " + self.get_role("Lynchee") + ".") else: self.deadp = deadp self.deadp_name = self.names[deadp] self.removePlayer(self.names[deadp]) self.announce("It is now night. Zzz...") Game.mkNight(self) return self.game_over()