projects
/
advent-of-code-22.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a30d9fb
)
Tidying
author
Neil Smith
<NeilNjae@users.noreply.github.com>
Mon, 19 Dec 2022 11:27:36 +0000
(11:27 +0000)
committer
Neil Smith
<NeilNjae@users.noreply.github.com>
Mon, 19 Dec 2022 11:27:36 +0000
(11:27 +0000)
advent17/Main.hs
patch
|
blob
|
history
diff --git
a/advent17/Main.hs
b/advent17/Main.hs
index 7c2b4d38a94e14a942a79cd60b8194392733d374..57794a95591b8c564b3d7e716fbe29c89ad1ef4b 100644
(file)
--- a/
advent17/Main.hs
+++ b/
advent17/Main.hs
@@
-42,10
+42,9
@@
main =
print $ part2 oneJetCycle
part1, part2 :: [Position] -> Int
print $ part2 oneJetCycle
part1, part2 :: [Position] -> Int
-part1 oneJetCycle = rocksHeight final -- fromMaybe -1 $ maximumOf (folded . _y) (final ^. chamber)
- where final = simulate mkRocks (cycle oneJetCycle) 2022
+part1 oneJetCycle = rocksHeight $ simulate mkRocks (cycle oneJetCycle) 2022
-part2 oneJetCycle = calculatedHeight
-- (cycleStartState, cycleRepeatState)
+part2 oneJetCycle = calculatedHeight
where initState = SimulationState
{ _chamber = S.empty
, _jets = (cycle oneJetCycle)
where initState = SimulationState
{ _chamber = S.empty
, _jets = (cycle oneJetCycle)