More loop cleaning
authorNeil Smith <neil.git@njae.me.uk>
Thu, 24 Dec 2020 16:49:09 +0000 (16:49 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Thu, 24 Dec 2020 16:49:09 +0000 (16:49 +0000)
advent15/src/advent15loop.hs

index f023cf9e330717d0a39c066d82f5c952165f0412..ca1d81104631fec09f47f55230f27769064b8aa8 100644 (file)
@@ -25,10 +25,10 @@ runGame seed roundsNeeded =
        gameLoop roundsNeeded round word history
        readSTRef word
 
-gameLoop targetRound round word history =
-    do gameStep round word history 
-         `untilM_` ((== targetRound) <$> readSTRef round)
-       return ()
+-- gameLoop targetRound round word history =
+--     do gameStep round word history 
+--          `untilM_` ((== targetRound) <$> readSTRef round)
+--        return ()
 
 -- gameLoop targetRound round word history =
 --     do ( gameStep round word history 
@@ -55,10 +55,10 @@ gameLoop targetRound round word history =
 --                $ gameStep round word history
 --        return ()
 
--- gameLoop targetRound round word history =
---     do whileM_ ((/= targetRound) <$> readSTRef round)
---                $ gameStep round word history
---        return ()
+gameLoop targetRound round word history =
+    do whileM_ ((/= targetRound) <$> readSTRef round)
+               $ gameStep round word history
+       return ()
 
 seedGame seed historySize = 
   do round <- newSTRef $ length seed