From 319fc7dd4311eeb0912e020c25f91e3771ce3dfc Mon Sep 17 00:00:00 2001 From: Sander Land Date: Sun, 17 Jan 2021 11:16:38 +0100 Subject: [PATCH] fix initial player --- katrain/core/sgf_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/katrain/core/sgf_parser.py b/katrain/core/sgf_parser.py index 441780f..ad7d346 100644 --- a/katrain/core/sgf_parser.py +++ b/katrain/core/sgf_parser.py @@ -304,7 +304,7 @@ class SGFNode: def initial_player(self): # player for first node root = self.root if "PL" in root.properties: # explicit - return "B" if self.get_property("PL").upper().strip() == "B" else "W" + return "B" if self.root.get_property("PL").upper().strip() == "B" else "W" elif root.children: # child exist, use it if not placement for child in root.children: for color in "BW":