Skip to content

Commit fc0004c

Browse files
committed
修复“象攻击边界”的处理错误
1 parent 5a59068 commit fc0004c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cchess/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def _bishop_attacks(square: Square, occupied: BitBoard, color: int):
388388
continue
389389
if not occupied & BB_SQUARES[eye_sq]:
390390
sq = square + delta
391-
if not (0 <= sq <= 90) or square_distance(sq, square) > 2:
391+
if not (0 <= sq < 90) or square_distance(sq, square) > 2:
392392
continue
393393
attacks |= BB_SQUARES[sq]
394394

0 commit comments

Comments
 (0)