aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Octans/CLI.rakumod
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-03-04 14:26:19 +0530
committerAndinus <andinus@nand.sh>2021-03-04 14:26:19 +0530
commitbdb1dbcea8c4ab9270caeacf6bfb448c35824a90 (patch)
tree7106498830bacd6cefa4e53c33e175ced8650670 /lib/Octans/CLI.rakumod
parentfba335150a95f7688c2e0ae279e837557d2b5a0e (diff)
downloadoctans-bdb1dbcea8c4ab9270caeacf6bfb448c35824a90.tar.gz
Mark visited gray squares with "*"
Diffstat (limited to 'lib/Octans/CLI.rakumod')
-rw-r--r--lib/Octans/CLI.rakumod6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Octans/CLI.rakumod b/lib/Octans/CLI.rakumod
index 0672761..3a5be30 100644
--- a/lib/Octans/CLI.rakumod
+++ b/lib/Octans/CLI.rakumod
@@ -51,7 +51,11 @@ multi sub MAIN(
print " " x 3;
for ^$puzzle.grids[$y].elems -> $x {
printf " {$puzzle.grids[$y][$x]}%s",
- @visited[$y][$x] ?? "/" !! " ";
+ @visited[$y][$x]
+ # visited gray squares get marked with "*",
+ # visited squares with "/" & unvisited with " ".
+ ?? ($puzzle.is-gray-square($y, $x) ?? "*" !! "/")
+ !! " ";
}
print "\n";
}