Skip to content

Commit acb4494

Browse files
Merge pull request #8 from startnow2024/main
2 parents 1176993 + b752d56 commit acb4494

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cchess/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ def uci(self) -> str:
589589

590590
@classmethod
591591
def from_uci(cls, uci: str):
592-
if len(uci) == 4:
592+
if uci == "0000":
593+
return cls.null()
594+
elif len(uci) == 4:
593595
from_square = SQUARE_NAMES.index(uci[0:2])
594596
to_square = SQUARE_NAMES.index(uci[2:4])
595597
return cls(from_square, to_square)

0 commit comments

Comments
 (0)