projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0f8ce41
)
Fix Janggi cannon pin detection (#106)
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Tue, 5 May 2020 17:47:48 +0000 (19:47 +0200)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Tue, 5 May 2020 17:47:48 +0000 (19:47 +0200)
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
73698b2
..
c74f933
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-744,8
+744,8
@@
Bitboard Position::slider_blockers(Bitboard sliders, Square s, Bitboard& pinners
if (b && (!more_than_one(b) || ((AttackRiderTypes[type_of(piece_on(sniperSq))] & HOPPING_RIDERS) && popcount(b) == 2)))
{
// Janggi cannons block each other
- if ((pieces(JANGGI_CANNON) & sniperSq) && (pieces(JANGGI_CANNON) & blockers))
- blockers &= pieces(JANGGI_CANNON);
+ if ((pieces(JANGGI_CANNON) & sniperSq) && (pieces(JANGGI_CANNON) & b))
+ b &= pieces(JANGGI_CANNON);
blockers |= b;
if (b & pieces(color_of(piece_on(s))))
pinners |= sniperSq;