my $json_pos;
if ($includetransp) {
($json_pos, undef) = get_json_move($np, undef, $chld_in, $chld_out);
+
+ # See if this move exists only due to transpositions.
+ my ($alt_json_pos, undef) = get_json_move($np, $root_aux_data->{'pos_hash'}, $chld_in, $chld_out);
+ if (!defined($alt_json_pos)) {
+ $json_pos->{'transpose_only'} = 1;
+ }
} else {
($json_pos, undef) = get_json_move($np, $root_aux_data->{'pos_hash'}, $chld_in, $chld_out);
}
chomp (my $line = <$chld_out>);
if ($line eq '-') {
warn "Missing pos '" . $pos->fen . "' " . $filter_prev_pos_hash;
- return ({}, {});
+ return (undef, undef);
}
my ($white, $draw, $black, $opening_num, $white_sum_elo, $black_sum_elo, $num_elo, $timestamp, $pgn_file_number, $pgn_start_position, @moves) = split / /, $line;