aboutsummaryrefslogtreecommitdiff
path: root/challenge-086/abigail/perl
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2020-11-11 20:07:28 +0100
committerAbigail <abigail@abigail.be>2020-11-11 20:07:28 +0100
commitd94c0f0acdbfb27c67728a52f28d06fc944c3e41 (patch)
treedbcf297daa3d368d8f85c106daf1f2640f1fdcaf /challenge-086/abigail/perl
parente0679ea4a927d6ca49cb7b6605290ac3d3dcefb7 (diff)
downloadperlweeklychallenge-club-d94c0f0acdbfb27c67728a52f28d06fc944c3e41.tar.gz
perlweeklychallenge-club-d94c0f0acdbfb27c67728a52f28d06fc944c3e41.tar.bz2
perlweeklychallenge-club-d94c0f0acdbfb27c67728a52f28d06fc944c3e41.zip
Rename two variables
Diffstat (limited to 'challenge-086/abigail/perl')
-rw-r--r--challenge-086/abigail/perl/ch-2.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/challenge-086/abigail/perl/ch-2.pl b/challenge-086/abigail/perl/ch-2.pl
index 4b5c3146f7..6b27b80329 100644
--- a/challenge-086/abigail/perl/ch-2.pl
+++ b/challenge-086/abigail/perl/ch-2.pl
@@ -42,12 +42,12 @@ my @INDICES = (0 .. $SIZE - 1);
my @ELEMENTS = (1 .. $SIZE);
#
-# Calculate the block size. For regular shaped sudoku's, this
+# Calculate the box size. For regular shaped sudoku's, this
# is sqrt ($SIZE) x sqrt ($SIZE). For other sized shaped sudoku's,
-# we find the the nearest values; block will then we wider than
+# we find the the nearest values; box will then we wider than
# they are high.
#
-my ($block_x, $block_y) = do {
+my ($box_x, $box_y) = do {
my $s = int sqrt $SIZE;
$s -- while $SIZE % $s;
($s, $SIZE / $s);
@@ -152,8 +152,8 @@ sub sees ($x, $y) {
$i == $x || # Same column
$j == $y || # Same row
# Same box
- int ($i / $block_x) == int ($x / $block_x) &&
- int ($j / $block_y) == int ($y / $block_y);
+ int ($i / $box_x) == int ($x / $box_x) &&
+ int ($j / $box_y) == int ($y / $box_y);
}
}
$out;