Attempt to fix some space leaks, general cleanup

This commit is contained in:
2022-08-23 23:00:12 +01:00
parent 9f00e67298
commit e7e20277e4
12 changed files with 71 additions and 263 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ module Dodge.Tesla.Arc
, moveTeslaArc
) where
import Data.Foldable
import Dodge.Data.CrWlID
import Dodge.Data.ArcStep
import Data.Maybe
@@ -30,7 +31,7 @@ moveTeslaArc ::
TeslaArc ->
(World, Maybe TeslaArc)
moveTeslaArc w pt
| _taTimer pt == 2 = (makesparks $ foldr damthings w thearc, Just $ pt & taTimer -~ 1)
| _taTimer pt == 2 = (makesparks $ foldl' (flip damthings) w thearc, Just $ pt & taTimer -~ 1)
| _taTimer pt < 1 = (w, Nothing)
| otherwise = (w, Just $ pt & taTimer -~ 1)
where