diff --git a/src/movepick.cpp b/src/movepick.cpp index 415d252f3..e4a610afe 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -171,7 +171,7 @@ ExtMove* MovePicker::score(MoveList& ml) { // penalty for moving to a square threatened by a lesser piece // or bonus for escaping an attack by a lesser piece. - int v = threatByLesser[pt] & to ? -19 : 20 * bool(threatByLesser[pt] & from); + int v = 20 * (bool(threatByLesser[pt] & from) - bool(threatByLesser[pt] & to)); m.value += PieceValue[pt] * v;