projects
/
advent-of-code-16.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be70325
)
Made show a bit clearer
author
Neil Smith
<neil.git@njae.me.uk>
Fri, 9 Dec 2016 18:22:09 +0000
(18:22 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Fri, 9 Dec 2016 18:22:09 +0000
(18:22 +0000)
advent08.hs
patch
|
blob
|
history
diff --git
a/advent08.hs
b/advent08.hs
index c89ba8094fd2baf371f127dceb862d65af81164c..7def6d1224d649bc1ce85097e151d2ff64f5a409 100644
(file)
--- a/
advent08.hs
+++ b/
advent08.hs
@@
-22,8
+22,8
@@
mkScreen w h = array ((0, 0), (h - 1, w - 1))
showScreen :: Screen -> String
showScreen screen = unlines [showRow r | r <- [minRow..maxRow]]
where ((minRow, minCol), (maxRow, maxCol)) = bounds screen
- showCell True = '
#
'
- showCell False = '
.
'
+ showCell True = '
*
'
+ showCell False = '
'
showRow r = [showCell (screen!(r, c)) | c <- [minCol..maxCol]]
countLights :: Screen -> Int