my $t = $tb_cache{$fen};
my $pv = $t->{'pv'};
- my $matelen = int((1 + scalar @$pv) / 2);
+ my $matelen = int((1 + $t->{'score'}) / 2);
if ($t->{'result'} eq '1/2-1/2') {
$info->{'score_cp'} = 0;
} elsif ($t->{'result'} eq '1-0') {
}
$tb_cache{$fen} = {
result => $pgn->result,
- pv => \@uci_moves
+ pv => \@uci_moves,
+ score => $response->{'Response'}{'Score'},
};
output();
}