Order the recaptures by MVV/LVA
authorMarco Costalba <mcostalba@gmail.com>
Sun, 22 Jan 2012 10:19:44 +0000 (11:19 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 22 Jan 2012 10:19:44 +0000 (11:19 +0100)
Almost no functional change because multiple recaptures
to same square are very rare, but neverthless it seems
the correct thing to do.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/movepick.cpp

index a656cc2f86ea2b7f33025c2b09ea564a321b4598..1b84f14ee83614ca1995e78b50f38d5e94ce8054 100644 (file)
@@ -350,7 +350,7 @@ Move MovePicker::next_move() {
            break;
 
       case CAPTURES_S6:
-          move = (curMove++)->move;
+          move = pick_best(curMove++, lastMove)->move;
           if (to_sq(move) == recaptureSquare)
               return move;
           break;