]> git.sesse.net Git - remoteglot/blobdiff - Position.pm
Support displaying historic analysis. Not perfect still, though.
[remoteglot] / Position.pm
index b847d101162a51a23d6bd7b5ff758a9a66a98930..9333bcd58af514badb9a7b31463a4c00763da609 100644 (file)
@@ -112,7 +112,14 @@ sub fen {
 
 sub to_json_hash {
        my $pos = shift;
-       my $json = { %$pos, board => undef, prettyprint_cache => undef, fen => $pos->fen() };
+       my $json = { %$pos, fen => $pos->fen() };
+       delete $json->{'board'};
+       delete $json->{'prettyprint_cache'};
+       delete $json->{'black_castle_k'};
+       delete $json->{'black_castle_q'};
+       delete $json->{'white_castle_k'};
+       delete $json->{'white_castle_q'};
+       delete $json->{'time_since_100move_rule_reset'};
        if ($json->{'player_w'} =~ /^base64:(.*)$/) {
                $json->{'player_w'} = MIME::Base64::decode_base64($1);
        }