Skip to content

Commit

Permalink
Fix: add first heard message to log (#842)
Browse files Browse the repository at this point in the history
When the logger is empty, newly heard messages would have been ignored.
  • Loading branch information
xsebek authored Nov 7, 2022
1 parent 63cd22f commit 1930fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Swarm/Game/Step.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ execConst c vs s k = do
m <- traceLog Said msg -- current robot will inserted to robot set, so it needs the log
emitMessage m
let addLatestClosest rl = \case
Seq.Empty -> Seq.Empty
Seq.Empty -> Seq.singleton m
es Seq.:|> e
| e ^. leTime < m ^. leTime -> es |> e |> m
| manhattan rl (e ^. leLocation) > manhattan rl (m ^. leLocation) -> es |> m
Expand Down

0 comments on commit 1930fe6

Please sign in to comment.