Skip to content

Commit 0d90b5b

Browse files
committed
Use -1 instead of None as invalid pocket._pieces
1 parent 4376eb7 commit 0d90b5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chess/variant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ def __init__(self, symbols: Iterable[str] = "") -> None:
835835

836836
def reset(self) -> None:
837837
"""Clears the pocket."""
838-
self._pieces = [None, 0, 0, 0, 0, 0, 0]
838+
self._pieces = [-1, 0, 0, 0, 0, 0, 0]
839839

840840
def add(self, piece_type: chess.PieceType) -> None:
841841
"""Adds a piece of the given type to this pocket."""

0 commit comments

Comments
 (0)