mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Bug fix for discovered checks in connected_moves().
Because of a hard-to-spot single-character bug in connected_moves(), the discovered check code had no effect whatsoever. The condition in the if (...) statement at the beginning of the code would always return false. Thanks to Edsel Apostol for pointing out this bug!
This commit is contained in:
parent
17c5119222
commit
03d6a86900
1 changed files with 1 additions and 1 deletions
|
@ -2185,7 +2185,7 @@ namespace {
|
|||
// Case 5: Discovered check, checking piece is the piece moved in m1
|
||||
if ( piece_is_slider(pos.piece_on(t1))
|
||||
&& bit_is_set(squares_between(t1, pos.king_square(pos.side_to_move())), f2)
|
||||
&& !bit_is_set(squares_between(t2, pos.king_square(pos.side_to_move())), t2))
|
||||
&& !bit_is_set(squares_between(t1, pos.king_square(pos.side_to_move())), t2))
|
||||
{
|
||||
Bitboard occ = pos.occupied_squares();
|
||||
Color us = pos.side_to_move();
|
||||
|
|
Loading…
Add table
Reference in a new issue