X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=049cdabaafaa0f0f824bec3cb0df34f147176fe2;hp=0bfbc4c89dba35c5d7d1986691e0c6ca03df73f0;hb=3a8a3682f658b1fd5f1ae8420230a356f57fc0ad;hpb=749623f7b8722abab1c9c37da4a7c2d7a33bea1c diff --git a/remoteglot.pl b/remoteglot.pl index 0bfbc4c..049cdab 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -290,6 +290,7 @@ sub handle_pgn { my $pos; if (exists($tags->{'FEN'})) { $pos = Position->from_fen($tags->{'FEN'}); + $pos->{'last_move'} = 'none'; $pos->{'player_w'} = $white; $pos->{'player_b'} = $black; $pos->{'start_fen'} = $tags->{'FEN'}; @@ -909,6 +910,7 @@ sub output_json { } else { $pos = Position->start_pos('white', 'black'); } + $pos->{'chess960'} = $pos_calculating->{'chess960'}; my $halfmove_num = 0; for my $move (@{$pos_calculating->{'history'}}) { my $id = id_for_pos($pos, $halfmove_num);