X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=Position.pm;h=6b772a67b82fafe4bcffb5b44a09849a8fb49eeb;hp=9868b218e6c4e2b74b5d2a21eeb8623d849d1295;hb=352d2a6829b4144ba1ad156c08f9b3332bc73d0f;hpb=2ec5e8902926f0e192fb119f3955dab2564816aa diff --git a/Position.pm b/Position.pm index 9868b21..6b772a6 100644 --- a/Position.pm +++ b/Position.pm @@ -35,6 +35,7 @@ sub new { $pos->{'last_move_uci'} = undef; } $pos->{'last_move'} = $x[29]; + $pos->{'prettyprint_cache'} = {}; bless $pos, $class; return $pos; @@ -111,7 +112,7 @@ sub fen { sub to_json_hash { my $pos = shift; - my $json = { %$pos, board => undef, fen => $pos->fen() }; + my $json = { %$pos, board => undef, prettyprint_cache => undef, fen => $pos->fen() }; if ($json->{'player_w'} =~ /^base64:(.*)$/) { $json->{'player_w'} = MIME::Base64::decode_base64($1); }