]> git.sesse.net Git - remoteglot/commitdiff
Fix the move prettyprinting on make_move().
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 6 Aug 2014 21:14:52 +0000 (23:14 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 6 Aug 2014 21:14:52 +0000 (23:14 +0200)
Position.pm

index 5d63ae2ff662d9abce22ba9bbe40a729ea7b8f8d..777571e121d1ba5fc7301d54a6a6b7e1926cb202 100644 (file)
@@ -167,7 +167,8 @@ sub make_move {
        }
        $np->{'player_w'} = $pos->{'player_w'};
        $np->{'player_b'} = $pos->{'player_b'};
-       $np->{'last_move'} = '(move)';  # FIXME
+       my ($move, $nb) = $pos->{'board'}->prettyprint_move($from_row, $from_col, $to_row, $to_col, $promo);
+       $np->{'last_move'} = $move;
        return bless $np;
 }