lpst.pl - fixed bug with checking MOVBLOCK spaces
This commit is contained in:
parent
3af63ea303
commit
0f942f4fb8
20
lpst.pl
20
lpst.pl
@ -238,7 +238,7 @@ my %MOVE = (
|
||||
MoveStruct->new("mov" => [ 1, 0], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 1,-1], "type" => $MOVE_ENUM)
|
||||
],
|
||||
$MG_QS => [
|
||||
$MG_QS => [
|
||||
MoveStruct->new("mov" => [-3, 3], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [-2, 2], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [-2, 0], "type" => $MOVE_ENUM),
|
||||
@ -254,9 +254,11 @@ my %MOVE = (
|
||||
MoveStruct->new("mov" => [ 1,-1], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 2, 0], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 2,-2], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 3,-3], "type" => $MOVE_ENUM)
|
||||
],
|
||||
$MG_AU => [
|
||||
MoveStruct->new("mov" => [ 3,-3], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 3, 0], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [-3, 0], "type" => $MOVE_ENUM)
|
||||
],
|
||||
$MG_AU => [
|
||||
MoveStruct->new("mov" => [-1, 0], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [-1, 1], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 0, 1], "type" => $MOVE_ENUM),
|
||||
@ -264,7 +266,7 @@ my %MOVE = (
|
||||
MoveStruct->new("mov" => [ 1, 0], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [ 1,-1], "type" => $MOVE_ENUM)
|
||||
],
|
||||
$MG_SY => [
|
||||
$MG_SY => [
|
||||
MoveStruct->new("mov" => [-4, 4], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [-3, 3], "type" => $MOVE_ENUM),
|
||||
MoveStruct->new("mov" => [-3, 2], "type" => $MOVE_ENUM),
|
||||
@ -600,7 +602,7 @@ sub shade_move($$){
|
||||
$_->{"type"}
|
||||
]
|
||||
} grep {
|
||||
($_->{"type"} && $en) eq $en
|
||||
($_->{"type"} & $en) eq $_->{"type"}
|
||||
} @{$MOVE{$c1}};
|
||||
|
||||
for my $mv (@mv1){
|
||||
@ -623,12 +625,12 @@ binmode(STDOUT, ":utf8");
|
||||
$AXIS_RV{$_}
|
||||
}(1...11);
|
||||
|
||||
# my $m1 = "F7";
|
||||
my $m1 = "A1";
|
||||
my $m1 = "F7";
|
||||
# my $m1 = "A1";
|
||||
my $c1 = $MG_QS;
|
||||
|
||||
$board{$m1} = $P1.$DIV.$c1;
|
||||
shade_move($m1, $MOVE_ENUM);
|
||||
shade_move($m1, $MOVBLOCK_ENUM);
|
||||
|
||||
disp_board();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user