update player profile with const

This commit is contained in:
better629 2024-04-10 20:46:59 +08:00
parent a466bc9243
commit fe0e62806d
3 changed files with 16 additions and 15 deletions

View file

@ -166,9 +166,9 @@ class WerewolfExtEnv(ExtEnv):
"""init players using different roles' num"""
role_objs = []
for role_obj in role_uniq_objs:
if "Villager" in str(role_obj):
if RoleType.VILLAGER.value in str(role_obj):
role_objs.extend([role_obj] * num_villager)
elif "Werewolf" in str(role_obj):
elif RoleType.WEREWOLF.value in str(role_obj):
role_objs.extend([role_obj] * num_werewolf)
else:
role_objs.append(role_obj)