X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=Board.pm;h=3e0fd33a52b4fa72a4264a4eff58962dc93cc197;hp=8573bd8f29814e7cdce82555332b4eda3dc612b0;hb=5a9dbd3f72666ce02396c30d1b74dae3ab32d40b;hpb=de97cece71fe4a5f64a88a807805608c7a289813 diff --git a/Board.pm b/Board.pm index 8573bd8..3e0fd33 100644 --- a/Board.pm +++ b/Board.pm @@ -514,22 +514,22 @@ sub _prettyprint_move_no_check_or_mate { # white short castling if ($move eq 'e1g1' && $piece eq 'K') { - return '0-0'; + return 'O-O'; } # white long castling if ($move eq 'e1c1' && $piece eq 'K') { - return '0-0-0'; + return 'O-O-O'; } # black short castling if ($move eq 'e8g8' && $piece eq 'k') { - return '0-0'; + return 'O-O'; } # black long castling if ($move eq 'e8c8' && $piece eq 'k') { - return '0-0-0'; + return 'O-O-O'; } my $pretty; @@ -541,12 +541,12 @@ sub _prettyprint_move_no_check_or_mate { $pretty = substr($move, 0, 1) . 'x' . _pos_to_square($to_row, $to_col); } else { $pretty = _pos_to_square($to_row, $to_col); + } - if (defined($promo) && $promo ne '') { - # promotion - $pretty .= "="; - $pretty .= uc($promo); - } + if (defined($promo) && $promo ne '') { + # promotion + $pretty .= "="; + $pretty .= uc($promo); } return $pretty; }