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 5d63ae2..777571e 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;
 }