Skip to content

Commit a5e14b5

Browse files
committed
fix
1 parent 1cc69d8 commit a5e14b5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

chess/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def _reset_board(self) -> None:
585585
self.occupied = BB_RANK_1 | BB_RANK_2 | BB_RANK_7 | BB_RANK_8
586586

587587
def __hash__(self):
588-
return (self.pawns & self.occupied_co[WHITE],
588+
return hash((self.pawns & self.occupied_co[WHITE],
589589
self.pawns & self.occupied_co[BLACK],
590590
self.knights & self.occupied_co[WHITE],
591591
self.knights & self.occupied_co[BLACK],
@@ -596,7 +596,7 @@ def __hash__(self):
596596
self.queens & self.occupied_co[WHITE],
597597
self.queens & self.occupied_co[BLACK],
598598
self.kings & self.occupied_co[WHITE],
599-
self.kings & self.occupied_co[BLACK])
599+
self.kings & self.occupied_co[BLACK]))
600600

601601

602602
def reset_board(self) -> None:
@@ -1512,7 +1512,7 @@ def __init__(self: BoardT, fen: Optional[str] = STARTING_FEN, *, chess960: bool
15121512
self.set_fen(fen)
15131513

15141514
def __hash__(self):
1515-
return super.__hash__ + self.turn + hash(self.ep_square)
1515+
return super(Board, self).__hash__() + self.turn + hash(self.ep_square)
15161516

15171517
@property
15181518
def legal_moves(self) -> LegalMoveGenerator:

0 commit comments

Comments
 (0)