]> git.sesse.net Git - remoteglot/blobdiff - remoteglot.pl
Fix another score inversion issue, this time in the secondary engine output.
[remoteglot] / remoteglot.pl
index 1d4f7d440694ad2129a7dc71d7fefd06a8147505..ab492bc443365dffe8dea1d342ab85e4f8af0820 100755 (executable)
@@ -345,6 +345,11 @@ sub style12_to_pos {
        $pos{'black_castle_q'} = $x[14];
        $pos{'time_to_100move_rule'} = $x[15];
        $pos{'move_num'} = $x[26];
        $pos{'black_castle_q'} = $x[14];
        $pos{'time_to_100move_rule'} = $x[15];
        $pos{'move_num'} = $x[26];
+       if ($x[27] =~ /([a-h][1-8])-([a-h][1-8])/) {
+               $pos{'last_move_uci'} = $1 . $2;
+       } else {
+               $pos{'last_move_uci'} = undef;
+       }
        $pos{'last_move'} = $x[29];
        $pos{'fen'} = make_fen(\%pos);
 
        $pos{'last_move'} = $x[29];
        $pos{'fen'} = make_fen(\%pos);
 
@@ -772,7 +777,7 @@ sub output_screen {
                        my $key = $pretty_move;
                        my $line = sprintf("  %-6s %6s %3s  %s",
                                $pretty_move,
                        my $key = $pretty_move;
                        my $line = sprintf("  %-6s %6s %3s  %s",
                                $pretty_move,
-                               short_score($info, $pos_calculating_second_engine, $mpv, 1),
+                               short_score($info, $pos_calculating_second_engine, $mpv, 0),
                                "d" . $info->{'depth' . $mpv},
                                join(', ', @pretty_pv));
                        push @refutation_lines, [ $key, $line ];
                                "d" . $info->{'depth' . $mpv},
                                join(', ', @pretty_pv));
                        push @refutation_lines, [ $key, $line ];