Browse Source

lpst.pl - refactored shade_move to remove redundant arrays

master
gashapwn 3 years ago
parent
commit
3af63ea303
1 changed files with 5 additions and 10 deletions
  1. +5
    -10
      lpst.pl

+ 5
- 10
lpst.pl View File

@@ -589,26 +589,21 @@ sub shade_move($$){
my ($not, $en) = (shift, shift);
my $c1;
my @mv1;
my @mv2;

$c1 = cell_pi($not);

@mv1 = map {
$_
} grep {
($_->{"type"} && $en) eq $en
}@{$MOVE{$c1}};

@mv2 = grep {
@mv1 = grep {
$_ if $_->[0] ne $ERR_C_1;
} map {
[
calc_move($not, $_->{"mov"}),
$_->{"type"}
]
} @mv1;
} grep {
($_->{"type"} && $en) eq $en
} @{$MOVE{$c1}};
for my $mv (@mv2){
for my $mv (@mv1){
shade_cell($mv->[0], $mv->[1]);
}
}


Loading…
Cancel
Save