lpst/test.pl
2021-04-12 00:36:01 +00:00

58 lines
1007 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
use lib './';
use NTVL;
use LPST;
my $ns0;
# $ns0 = "";
# $ns0 .= "A I Im Au H\n";
# $ns0 .= "A S Im Rc It\n";
# $ns0 .= "Aa1*, Ab1*, Ac1*, Ad1*, Ae1*, Qf1*, Ag1*, Ah1*, Ai1*, Aj1*, Ak1*, Ad2*, Ai2*, Aj2*, Ak2*, Ad3*\n";
# $ns0 .= "Aa11*, Ab11*, Ac11*, Ad11*, Ae11*, Qf11*\n";
# $ns0 .= "Aa1a2\n";
# $ns0 .= "Qf11g11\n";
# $ns0 .= "Aa2a3\n";
# $ns0 .= "Qg11f10\n";
# $ns0 .= "Aa3a4\n";
# $ns0 .= "Qf10e10\n";
# $ns0 .= "Aa4a5\n";
# $ns0 .= "Qe10d10\n";
# $ns0 .= "Aa5a6\n";
# # $ns0 .= "Qd10e9\n";
$ns0 = "";
$ns0 .= "A I H It N\n";
$ns0 .= "A I H It N\n";
$ns0 .= "Ac3*, Qd3*\n";
$ns0 .= "Ac11*, Qd11*\n";
sub roll_back($){
my @arr;
my $game_str = shift;
@arr = split(/\n/, $game_str);
if(scalar @arr == 1){
return "";
}
return join("\n", splice(@arr, 0, -1))
}
# printf("%s\n", $ns0);
# $ns0 = roll_back($ns0);
# printf("%s\n", $ns0);
$b = LPST->new();
NTVL->f1($b, $ns0);
# $b->shade_all_p2_mvmt();
# $b->disp_board();