lpst.pl - we can move a little dude around the board now!!

This commit is contained in:
gashapwn 2021-04-04 02:06:10 +00:00
parent 53a6d0ae44
commit 60550fc47c

16
lpst.pl
View File

@ -238,7 +238,12 @@ sub disp_2($$){
my ($r0, $c0) = (shift, shift);
my $p;
$p = $board{$r0}{$c0};
# Cell notation
my $not;
$not = cell_index_rev($c0, $r0);
$p = $board{$not};
return f_1($p);
# my ($r0, $c0) = (shift, shift);
@ -376,6 +381,10 @@ sub disp_board(){
printf("%s", $b);
}
sub cell_index_rev($$){
return $AXIS_RV{$_[0]}.$_[1];
}
sub cell_index($){
my ($chr1, $chr2) = (split(//, $_[0]));
return ($AXIS{$chr1}, $chr2);
@ -393,11 +402,10 @@ sub cell_index($){
$AXIS_RV{$_}
}(1...11);
$board{"C3"} = $P1.$DIV.$MG_A;
$board{"D2"} = $P1.$DIV.$MG_A;
printf("%s\n", $board{"C3"});
# disp_board();
disp_board();
# disp_0("C1");
# printf(">>%s, %s\n", cell_index("C1"));