Ejemplo n.º 1
0
 def check_villager(self, checker, victim):
     """
     If checker has the sufficient permission, return the role string of
     victim. Otherwise, will raise a GamePrivilegeError.
     """
     if NotedPlayers.can_kill(checker.role):
         return victim.role
     else:
         raise GamePrivilegeError(checker)
Ejemplo n.º 2
0
 def kill_villager(self, killer, victim):
     """
     If killer has the sufficient permission, kill the victim. Otherwise, will
     raise a GamePrivilegeError.
     """
     if NotedPlayers.can_kill(killer.role):
         self.__game_environment.kill_villager(victim)
     else:
         raise GamePrivilegeError(killer)