X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=advent21%2FMain.hs;h=536176f60ce38bce70d3cc36e6dafe4062833b4a;hb=86f61207669563aa3134ec14d52555b12bd7860c;hp=f187b98718cb4b595cea00b59d7c337b27755577;hpb=8307ab6717ea4ceaff6691cbc3fc5acf70335f79;p=advent-of-code-21.git diff --git a/advent21/Main.hs b/advent21/Main.hs index f187b98..536176f 100644 --- a/advent21/Main.hs +++ b/advent21/Main.hs @@ -44,11 +44,6 @@ instance Show Game where showActive = if (current game) == Player1 then "<" else ">" - - --- type GameState = State Game - - main :: IO () main = do text <- TIO.readFile "data/advent21.txt" @@ -109,7 +104,7 @@ nonDetGameStep games dice = MS.foldOccur (nonDetGameStep1 dice) MS.empty games -- | otherwise = MS.foldOccur (nonDetGameStep1 games) MS.empty dice nonDetGameStep1 :: Dice -> Game -> MS.Occur -> Games -> Games -nonDetGameStep1 dice game gnum acc = MS.foldOccur (nonDetGameStep2 game gnum) MS.empty dice +nonDetGameStep1 dice game gnum acc = MS.foldOccur (nonDetGameStep2 game gnum) acc dice -- nonDetGameStep1 game dice dnum acc -- | trace ("G1 >" ++ (show game) ++ "-" ++ (show dice) ++ ": " ++ (show gnum)) False = undefined -- | otherwise = MS.foldOccur (nonDetGameStep2 dice dnum) acc game