# if we're already thinking on something, stop and wait for the engine
# to approve
if (defined($pos_calculating)) {
- uciprint("stop");
+ if (!defined($pos_waiting)) {
+ uciprint("stop");
+ }
$pos_waiting = $pos;
} else {
# it's wrong just to give the FEN (the move history is useful,
chomp $line;
$line =~ tr/\r//d;
- print UCILOG "<= $line\n";
+ print UCILOG localtime() . " <= $line\n";
if ($line =~ /^info/) {
my (@infos) = split / /, $line;
shift @infos;
sub uciprint {
my $msg = shift;
print UCIWRITE "$msg\n";
- print UCILOG "=> $msg\n";
+ print UCILOG localtime() . " => $msg\n";
}
sub short_score {