6 my $pos = Position->start_pos('NN', 'NN');
9 my @pvs = split / /, $_;
10 print join(' ', prettyprint_pv_no_cache($pos->{'board'}, @pvs)), "\n";
13 sub prettyprint_pv_no_cache {
14 my ($board, @pvs) = @_;
16 if (scalar @pvs == 0 || !defined($pvs[0])) {
21 my ($from_col, $from_row, $to_col, $to_row, $promo) = parse_uci_move($pv);
22 my ($pretty, $nb) = $board->prettyprint_move($from_row, $from_col, $to_row, $to_col, $promo);
23 return ( $pretty, prettyprint_pv_no_cache($nb, @pvs) );
26 sub col_letter_to_num {
27 return ord(shift) - ord('a');
30 sub row_letter_to_num {
31 return 7 - (ord(shift) - ord('1'));
36 my $from_col = col_letter_to_num(substr($move, 0, 1));
37 my $from_row = row_letter_to_num(substr($move, 1, 1));
38 my $to_col = col_letter_to_num(substr($move, 2, 1));
39 my $to_row = row_letter_to_num(substr($move, 3, 1));
40 my $promo = substr($move, 4, 1);
41 return ($from_col, $from_row, $to_col, $to_row, $promo);