Skip to content

Commit

Permalink
Use -1 instead of None as invalid pocket._pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jun 11, 2022
1 parent 4376eb7 commit 0d90b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chess/variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def __init__(self, symbols: Iterable[str] = "") -> None:

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

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

0 comments on commit 0d90b5b

Please sign in to comment.