projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
52a1faa
)
Fix attackers calculation for xiangqi generals
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sun, 10 Nov 2019 16:07:43 +0000 (17:07 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sun, 10 Nov 2019 16:07:43 +0000 (17:07 +0100)
xiangqi
LLR: 1.77 (-2.94,2.94) [0.00,10.00]
Total: 1000 W: 330 L: 274 D: 396
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
7e86ba8
..
5dd265d
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-774,6
+774,9
@@
Bitboard Position::attackers_to(Square s, Bitboard occupied, Color c) const {
b |= pieces(c, FERS) & gates(c) & fers_sq;
}
+ if (var->xiangqiGeneral)
+ b ^= b & pieces(KING) & ~PseudoAttacks[~c][WAZIR][s];
+
return b;
}