From d94c0f0acdbfb27c67728a52f28d06fc944c3e41 Mon Sep 17 00:00:00 2001 From: Abigail Date: Wed, 11 Nov 2020 20:07:28 +0100 Subject: Rename two variables --- challenge-086/abigail/perl/ch-2.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'challenge-086') 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; -- cgit