aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Smith <baggy@baggy.me.uk>2021-06-23 22:09:26 +0100
committerGitHub <noreply@github.com>2021-06-23 22:09:26 +0100
commit516d403dfb48af20039960271bd639fa50f0a340 (patch)
tree3b422fed19b250aa911ad3de4d0b63b72da4bdc8
parentbc0ce07f1170260f1bcaf9032cb3e5d699857458 (diff)
downloadperlweeklychallenge-club-516d403dfb48af20039960271bd639fa50f0a340.tar.gz
perlweeklychallenge-club-516d403dfb48af20039960271bd639fa50f0a340.tar.bz2
perlweeklychallenge-club-516d403dfb48af20039960271bd639fa50f0a340.zip
Update README.md
-rw-r--r--challenge-118/james-smith/README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/challenge-118/james-smith/README.md b/challenge-118/james-smith/README.md
index 01fbce897c..f3a6bdf930 100644
--- a/challenge-118/james-smith/README.md
+++ b/challenge-118/james-smith/README.md
@@ -273,6 +273,7 @@ Rather than checking to see if a move from one square in a given direction ("tra
So we use the logic above to generate an array where the "key" is the square number and the "value" is an array of square numbers that you can reach.
This gives us the following code:
+
```perl
sub get_trans {
my $q=[];
@@ -317,6 +318,9 @@ The array looks something like:
[13,22]
....
]
+```
+
+The walk sub then becomes the simpler:
```perl
sub walk_trans {