]> git.sesse.net Git - remoteglot/blobdiff - Position.pm
Use standalone tablebase probes to convert +123.xx scores to mates. It causes some...
[remoteglot] / Position.pm
index 6840e7fdd6dd342ff883bbbd45aa2e6ff7546716..c3dbccaedde8b026a9585410c64134798e650d04 100644 (file)
@@ -38,6 +38,7 @@ sub new {
        }
        $pos->{'last_move'} = $x[29];
        $pos->{'prettyprint_cache'} = {};
+       $pos->{'tbprobe_cache'} = {};
 
        bless $pos, $class;
        return $pos;
@@ -78,6 +79,7 @@ sub from_fen {
        $pos->{'last_move_uci'} = undef;
        $pos->{'last_move'} = undef;
        $pos->{'prettyprint_cache'} = {};
+       $pos->{'tbprobe_cache'} = {};
        
        bless $pos, $class;
        return $pos;
@@ -164,6 +166,7 @@ sub to_json_hash {
        my $json = { %$pos, fen => $pos->fen() };
        delete $json->{'board'};
        delete $json->{'prettyprint_cache'};
+       delete $json->{'tbprobe_cache'};
        delete $json->{'black_castle_k'};
        delete $json->{'black_castle_q'};
        delete $json->{'white_castle_k'};