# 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;
$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;
}