Save futilityMargin for both colors

It will be needed by future patches.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-02-01 20:06:56 +01:00
parent 06a695d5b8
commit 35ada63174
3 changed files with 7 additions and 10 deletions

View File

@@ -860,11 +860,8 @@ namespace {
// capturing a single attacking piece can therefore result in a score
// change far bigger than the value of the captured piece.
Score v = apply_weight(make_score(SafetyTable[attackUnits], 0), WeightKingSafety[Us]);
ei.value -= Sign[Us] * v;
if (Us == pos.side_to_move())
ei.futilityMargin += mg_value(v);
ei.futilityMargin[Us] += mg_value(v);
}
}