File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1347,7 +1347,9 @@ bool Position::legal(Move m) const {
13471347
13481348 // Will the gate be blocked by king or rook?
13491349 Square rto = to + (to_sq (m) > from_sq (m) ? WEST : EAST);
1350- if (is_gating (m) && (gating_square (m) == to || gating_square (m) == rto))
1350+ if (is_gating (m) && (gating_square (m) == to || gating_square (m) == rto))
1351+ return false ;
1352+ if (freeze_squares () & to_sq (m))
13511353 return false ;
13521354
13531355 // Non-royal pieces can not be impeded from castling
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ if [[ $1 == "all" || $1 == "variant" ]]; then
156156 expect perft.exp atomic " fen 1R4kr/4K3/8/8/8/8/8/8 b k - 0 1" 4 17915 true > /dev/null
157157 expect perft.exp extinction " fen rnbqb1kr/pppppppp/8/8/8/8/PPPPPPPP/RNBQB1KR w AHah - 0 1" 4 195286 true > /dev/null
158158 expect perft.exp seirawan " fen qbbrnkrn/pppppppp/8/8/8/8/PPPPPPPP/QBBRNKRN[HEhe] w ABCDEFGHabcdefgh - 0 1" 3 21170 true > /dev/null
159+ expect perft.exp spell-chess " fen 4k3/p7/8/8/8/8/8/4K2R[f] b K - 0 1 moves f@h1,a7a6" 1 5 > /dev/null
159160fi
160161
161162# large-board variants
You can’t perform that action at this time.
0 commit comments