lpst.pl - refactored shade_move to remove redundant arrays
This commit is contained in:
parent
8dbc330d45
commit
3af63ea303
15
lpst.pl
15
lpst.pl
@ -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…
Reference in New Issue
Block a user