Browse Source

LPST.pm - parametrized shade

master
gashapwn 3 years ago
parent
commit
2001529ded
2 changed files with 11 additions and 7 deletions
  1. +10
    -6
      LPST.pm
  2. +1
    -1
      ntvl.pl

+ 10
- 6
LPST.pm View File

@@ -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");





+ 1
- 1
ntvl.pl View File

@@ -28,5 +28,5 @@ my $b;

$b = LPST->new();

$b->shade_all_mvmt("P1");
# $b->shade_all_p1_mvmt();
$b->disp_board();

Loading…
Cancel
Save