Cleanup, trying to diagnose space leak in crit update

This commit is contained in:
2021-12-09 22:12:44 +00:00
parent bd94044445
commit 3c35a04531
23 changed files with 203 additions and 178 deletions
+3 -3
View File
@@ -11,19 +11,19 @@ import Control.Lens
import qualified SDL
import qualified Data.Set as S
import qualified Data.IntMap.Strict as IM
import Data.Monoid
import Data.Maybe
{- | The AI equivalent for your control. -}
yourControl
:: Creature
-> World
-> (Endo World, Maybe Creature)
-> (World -> World, Maybe Creature)
yourControl cr w =
( Endo updateUsingInput
( updateUsingInput
, Just . mouseActionsCr (_mouseButtons w) $ wasdWithAiming w speed 0 cr
)
where
speed = _mvSpeed $ _crMvType cr
{- | Turn key presses into creature movement. -}
wasdWithAiming
:: World