gamelogic
This commit is contained in:
@@ -46,11 +46,11 @@ class Roles(enum.Enum):
|
||||
Leaderwolf = enum.auto()
|
||||
|
||||
@classmethod
|
||||
def isWerwolf(cls, role: Roles):
|
||||
def isWerwolf(cls, role: "Roles"):
|
||||
return role in [cls.Werewolf, cls.Leaderwolf]
|
||||
|
||||
@classmethod
|
||||
def getGroup(cls, role: Roles):
|
||||
def getGroup(cls, role: "Roles"):
|
||||
return RoleGroup.Werewolfs if role in [cls.Werewolf, cls.Leaderwolf] else RoleGroup.Villagers
|
||||
|
||||
class Rules(object):
|
||||
@@ -98,6 +98,7 @@ class Player(object):
|
||||
diedInRound: int
|
||||
accusedBy: "Player"
|
||||
|
||||
|
||||
@property
|
||||
def isWerwolf(self):
|
||||
return Roles.isWerwolf(self.role)
|
||||
|
||||
Reference in New Issue
Block a user