Skip to content

Commit

Permalink
Remove debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
xsebek committed Sep 8, 2024
1 parent 10c0af1 commit 43c9879
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/swarm-engine/Swarm/Game/Step.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import Data.Foldable.Extra (notNull)
import Data.Functor (void)
import Data.IntMap qualified as IM
import Data.IntSet qualified as IS
import Data.List (intercalate)
import Data.Map qualified as M
import Data.Maybe (fromMaybe)
import Data.Sequence ((><))
Expand Down Expand Up @@ -341,22 +340,9 @@ hypotheticalWinCheck em g ws oc = do
_ -> return ()

queue <- messageInfo . announcementQueue Swarm.Util.<%= (>< Seq.fromList (map ObjectiveCompleted $ completionAnnouncementQueue finalAccumulator))

shouldPause <- use $ temporal . pauseOnCompletion
let willPause = newWinState /= Ongoing || (notNull queue && shouldPause == PauseOnAnyObjective)
-- TODO: remove this debug ouput
sendIO $
appendFile "log_win.txt" $
intercalate
" \t"
[ show $ getTickNumber ts
, if newWinState == Ongoing then "ongoing" else "won"
, if notNull queue then "queued" else "empty"
, show shouldPause
, if willPause then "AutoPause" else "Running"
] <> "\n"

when willPause $

when (newWinState /= Ongoing || (notNull queue && shouldPause == PauseOnAnyObjective)) $
temporal . runStatus .= AutoPause

mapM_ handleException $ exceptions finalAccumulator
Expand Down

0 comments on commit 43c9879

Please sign in to comment.