projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d1f4726
)
Make drop region constraint more explicit
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Tue, 1 Oct 2019 20:07:06 +0000 (22:07 +0200)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Tue, 1 Oct 2019 20:07:06 +0000 (22:07 +0200)
No functional change.
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
f6ef5db
..
ea2dfe6
100644
(file)
--- 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))