diff --git a/LPST.pm b/LPST.pm index 1406c6b..fade2fc 100644 --- a/LPST.pm +++ b/LPST.pm @@ -675,21 +675,25 @@ sub shade_pi_mvmt($$){ } } -sub shade_all_mvmt($){ - my $pl; +sub shade_all_mvmt($$){ + my ($pl, $en) = (shift, shift); my @pi1; - $pl = shift; + # $pl = shift; @pi1 = grep { cell_pl($_) eq $pl } keys(%board); for my $el (@pi1){ - shade_pi_mvmt($el, $MOVBLOCK_ENUM); + shade_pi_mvmt($el, $en); } } +sub shade_all_p1_mvmt($){ + shade_all_mvmt($P1, $MOVBLOCK_ENUM); +} + sub get_block_cell($){ my $pl; @@ -723,10 +727,10 @@ sub new { return bless $self, $class; } +binmode(STDOUT, ":utf8"); + return 1; -# Is this needed? -# binmode(STDOUT, ":utf8"); diff --git a/ntvl.pl b/ntvl.pl index 5c875a3..94fbc81 100644 --- a/ntvl.pl +++ b/ntvl.pl @@ -28,5 +28,5 @@ my $b; $b = LPST->new(); -$b->shade_all_mvmt("P1"); +# $b->shade_all_p1_mvmt(); $b->disp_board();