X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=e1da304a6732c49023471600ddf310af5e7663ac;hp=1d4f7d440694ad2129a7dc71d7fefd06a8147505;hb=73a78c97272fcd068f61469f868068cc94c723b4;hpb=61a53bad4fc57512897769ef778755a1cf7c0f9e diff --git a/remoteglot.pl b/remoteglot.pl index 1d4f7d4..e1da304 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -25,8 +25,7 @@ my $engine2_cmdline = "./stockfish_13111119_x64_modern_sse42"; my $telltarget = undef; # undef to be silent my @tell_intervals = (5, 20, 60, 120, 240, 480, 960); # after each move my $uci_assume_full_compliance = 0; # dangerous :-) -my $update_max_interval = 2.0; -my $second_engine_start_depth = 8; +my $update_max_interval = 1.0; my @masters = ( 'Sesse', 'Sessse', @@ -345,6 +344,11 @@ sub style12_to_pos { $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); @@ -772,7 +776,7 @@ sub output_screen { 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 ]; @@ -1140,9 +1144,9 @@ sub score_sort_key { if (defined($info->{'score_mate' . $mpv})) { if ($invert) { - return -(99999 - $info->{'score_mate' . $mpv}); - } else { return 99999 - $info->{'score_mate' . $mpv}; + } else { + return -(99999 - $info->{'score_mate' . $mpv}); } } else { if (exists($info->{'score_cp' . $mpv})) {