We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1176993 + b752d56 commit acb4494Copy full SHA for acb4494
1 file changed
cchess/__init__.py
@@ -589,7 +589,9 @@ def uci(self) -> str:
589
590
@classmethod
591
def from_uci(cls, uci: str):
592
- if len(uci) == 4:
+ if uci == "0000":
593
+ return cls.null()
594
+ elif len(uci) == 4:
595
from_square = SQUARE_NAMES.index(uci[0:2])
596
to_square = SQUARE_NAMES.index(uci[2:4])
597
return cls(from_square, to_square)
0 commit comments