play mode
This commit is contained in:
1 parent
12b1b1a212
commit
d6141d91d6
8 files changed
+227
-193
No files matched your search
+7
-7
@@ -131,18 +131,18 @@ class SGFNode:
|
||||
|
||||
# root properties available on any node
|
||||
@property
|
||||
def board_size(self) -> Union[int,Tuple]:
|
||||
size = str(self.root.get_first("SZ", '19'))
|
||||
if ':' in size:
|
||||
return tuple(map(size.split(':'),int))
|
||||
def board_size(self) -> Union[int, Tuple]:
|
||||
size = str(self.root.get_first("SZ", "19"))
|
||||
if ":" in size:
|
||||
return tuple(map(size.split(":"), int))
|
||||
return int(size)
|
||||
|
||||
@property
|
||||
def board_size_xy(self) -> Tuple[int,int]:
|
||||
def board_size_xy(self) -> Tuple[int, int]:
|
||||
x, y = self.board_size
|
||||
if not y:
|
||||
y=x
|
||||
return x,y
|
||||
y = x
|
||||
return x, y
|
||||
|
||||
@property
|
||||
def komi(self) -> float:
|
||||
|
||||
Reference in new issue
Block a user