projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0db865d
)
Fix placement chess in large-board version
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Wed, 20 Feb 2019 21:50:33 +0000 (22:50 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Wed, 20 Feb 2019 21:50:33 +0000 (22:50 +0100)
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
6f88c07
..
f41bf8f
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-767,7
+767,7
@@
bool Position::legal(Move m) const {
{
if (type_of(moved_piece(m)) != BISHOP)
{
- Bitboard remaining = drop_region(us) & ~pieces() & ~SquareBB[to];
+ Bitboard remaining = drop_region(us) & ~pieces() & ~SquareBB[to] & board_bb();
// 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))