From: Fabian Fichter Date: Tue, 1 Oct 2019 20:07:06 +0000 (+0200) Subject: Make drop region constraint more explicit X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=79826fd6058cd4854c58e68226deb61b1516bfeb;p=fairystockfish.git Make drop region constraint more explicit No functional change. --- diff --git a/src/position.cpp b/src/position.cpp index f6ef5db..ea2dfe6 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -793,7 +793,7 @@ bool Position::legal(Move m) const { { if (type_of(moved_piece(m)) != BISHOP) { - Bitboard remaining = drop_region(us) & ~pieces() & ~SquareBB[to] & board_bb(); + Bitboard remaining = drop_region(us, BISHOP) & ~pieces() & ~square_bb(to); // Are enough squares available to drop bishops on opposite colors? if ( (!( DarkSquares & pieces(us, BISHOP)) && ( DarkSquares & remaining)) + (!(~DarkSquares & pieces(us, BISHOP)) && (~DarkSquares & remaining)) < count_in_hand(us, BISHOP))