mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 11:39:15 +00:00
Relax constrain in connected_moves()
When testing if a piece is moving through the squares vacated by a previous move there is no reason to require the piece to be a slider, indeed we can have a double pawn push like in this example: r1q2rk1/2p1bppp/2Pp4/pN5b/Q1P1p3/4B2P/PP1R1PP1/1K5R w - - 3 18 Where black's move f5 is connected to previous move Be7 that frees the path. Or we can have a castle move: r1bqkb1r/pppp1ppp/2n1pn2/1B6/4P3/2N2N2/PPPP1PPP/R1BQK2R b KQkq - 5 1 Where a previous move Bb5 allows the white to castle king side. This time patch is mine ;-) new bench: 5809010
This commit is contained in:
parent
ed1574e46c
commit
972de506a0
1 changed files with 1 additions and 1 deletions
|
@ -1378,7 +1378,7 @@ split_point_start: // At split points actual search starts from here
|
|||
return true;
|
||||
|
||||
// Moving through the vacated square
|
||||
if (piece_is_slider(pos.piece_on(f2)) && (between_bb(f2, t2) & f1))
|
||||
if (between_bb(f2, t2) & f1)
|
||||
return true;
|
||||
|
||||
// The destination square for m2 is defended by the moving piece in m1
|
||||
|
|
Loading…
Add table
Reference in a new issue