Include the last move in simple (UCI) form in the JSON output.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 18 Nov 2013 01:02:40 +0000 (02:02 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 18 Nov 2013 01:02:40 +0000 (02:02 +0100)
remoteglot.pl

index 1d4f7d4..53d5cab 100755 (executable)
@@ -345,6 +345,11 @@ sub style12_to_pos {
        $pos{'black_castle_q'} = $x[14];
        $pos{'time_to_100move_rule'} = $x[15];
        $pos{'move_num'} = $x[26];
+       if ($x[27] =~ /([a-h][1-8])-([a-h][1-8])/) {
+               $pos{'last_move_uci'} = $1 . $2;
+       } else {
+               $pos{'last_move_uci'} = undef;
+       }
        $pos{'last_move'} = $x[29];
        $pos{'fen'} = make_fen(\%pos);