Skip to content

Commit 93351c0

Browse files
authored
Merge pull request official-stockfish#89 from ianfab/master
Bugfix for horde games with reverse colors
2 parents 85cbc37 + c734ed7 commit 93351c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/evaluate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ namespace {
824824
if (pos.is_horde())
825825
{
826826
// Assume a horde king distance of approximately 5
827-
if (Us == WHITE)
827+
if (pos.is_horde_color(Us))
828828
ebonus += distance(pos.square<KING>(Them), blockSq) * 5 * rr - 10 * rr;
829829
else
830830
ebonus += 25 * rr - distance(pos.square<KING>(Us), blockSq) * 2 * rr;

0 commit comments

Comments
 (0)