From 79826fd6058cd4854c58e68226deb61b1516bfeb Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Tue, 1 Oct 2019 22:07:06 +0200 Subject: [PATCH] Make drop region constraint more explicit No functional change. --- src/position.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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)) -- 1.7.0.4