player names

This commit is contained in:
Sander Land committed 2020-11-24 23:01:42 +01:00
1 parent f0a239c559
commit 32acd7f067
7 files changed
+42 -11

No files matched your search

+5 -1
View File
@@ -15,6 +15,7 @@ from katrain.core.constants import (
STATUS_ANALYSIS,
STATUS_INFO,
STATUS_TEACHING,
PLAYER_HUMAN,
)
from katrain.core.engine import KataGoEngine
from katrain.core.game_node import GameNode
@@ -296,7 +297,10 @@ class Game:
eval_thresholds = trainer_config["eval_thresholds"]
def player_name(player_info):
return f"{i18n._(player_info.player_type)} ({i18n._(player_info.player_subtype)})"
if player_info.name and player_info.player_type == PLAYER_HUMAN:
return player_info.name
else:
return f"{i18n._(player_info.player_type)} ({i18n._(player_info.player_subtype)})"
root_properties = self.root.properties
x_properties = {}