Skip to content

Commit 06b24f8

Browse files
committed
补充了对「一兵平x」等notation的识别
1 parent 8cc3651 commit 06b24f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cchess/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,7 @@ def from_pgn(cls, pgn_file: str, *,
21862186
move_lines = move_lines.translate(str.maketrans("123456789", "123456789"))
21872187
notations = re.findall("(?:(?:[兵卒车俥車马馬傌炮砲仕士象相帅帥将將][1-9一二三四五六七八九])|"
21882188
"(?:[前后][车俥車马馬傌炮砲])|"
2189-
"(?:[前中后二三四五][兵卒1-9一二三四五六七八九]))"
2189+
"(?:[前中后一二三四五][兵卒1-9一二三四五六七八九]))"
21902190
"[进退平][1-9一二三四五六七八九]", move_lines)
21912191
if not notations:
21922192
raise ValueError("Find no legal notations!")

0 commit comments

Comments
 (0)