In case we have more than one promotion move, prefer
the one that captures the biggest piece.
Almost no functional change, anyhow I don't expect any
ELO change, it is just the correct thing to do.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
for (MoveStack* cur = moves; cur != lastMove; cur++)
{
m = cur->move;
+ cur->score = pos.midgame_value_of_piece_on(move_to(m))
+ - pos.type_of_piece_on(move_from(m));
+
if (move_is_promotion(m))
- cur->score = QueenValueMidgame;
- else
- cur->score = pos.midgame_value_of_piece_on(move_to(m))
- - pos.type_of_piece_on(move_from(m));
+ cur->score += QueenValueMidgame;
}
}