2023-20 part 2 in haskell
This commit is contained in:
parent
603626268a
commit
21cbb9f5fe
2 changed files with 119 additions and 1 deletions
|
@ -61,7 +61,6 @@ compute input = let (x, y) = computeX 1000 (0, 0) $ initConjuctions input in x *
|
|||
computeX i n input = let (n', input') = compute' (1, 0) [("button", Low, "broadcaster")] input
|
||||
in computeX (i-1) (scoreAdd n n') input'
|
||||
compute' :: (Int, Int) -> [(String, Pulse, String)] -> Input -> ((Int, Int), Input)
|
||||
compute' n [] input = (n, input)
|
||||
compute' n signals input | length stepAll == 0 = (n, input)
|
||||
| otherwise = compute' (scoreAdd n $ score stepAll) stepAll alterAll
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue