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
+6
View File
@@ -68,6 +68,9 @@ crIsAimingR cr = return $ _posture (_crStance cr) == Aiming
crHasTarget :: (World,Creature) -> Bool
crHasTarget (_,cr) = isJust $ cr ^? crIntention . targetCr . _Just
crHasTarget' :: Creature -> Bool
crHasTarget' cr = isJust $ cr ^? crIntention . targetCr . _Just
crHasTargetR :: Creature -> Reader World Bool
crHasTargetR cr = return $ isJust $ cr ^? crIntention . targetCr . _Just
@@ -94,6 +97,9 @@ crSafeDistFromTargR d cr = return $ case cr ^? crIntention . targetCr . _Just of
crStratConMatches :: Strategy -> (World,Creature) -> Bool
crStratConMatches strat (_,cr) = eqConstr strat (_crStrategy $ _crActionPlan cr)
crStratConMatches' :: Strategy -> Creature -> Bool
crStratConMatches' strat cr = eqConstr strat (_crStrategy $ _crActionPlan cr)
crStratConMatchesR :: Strategy -> Creature -> Reader World Bool
crStratConMatchesR strat cr = return $ eqConstr strat (_crStrategy $ _crActionPlan cr)