From: Fabian Fichter Date: Fri, 8 Feb 2019 18:07:49 +0000 (+0100) Subject: Skip king protector bonus when there is no king X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=847a1cc4a8286a72b3713b67001672e7df417f1c;p=fairystockfish.git Skip king protector bonus when there is no king --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f61f9af..e5863ad 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -387,6 +387,7 @@ namespace { score += MinorBehindPawn; // Penalty if the piece is far from the king + if (pos.count(Us)) score -= KingProtector[Pt == BISHOP] * distance(s, pos.square(Us)); if (Pt == BISHOP)