Add in "linear" lWorld to separate time reversable worlds

This commit is contained in:
2022-10-28 12:24:51 +01:00
parent 5f6bd43599
commit 7e790b7153
130 changed files with 827 additions and 980 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ import LensHelp
damageCircle :: Float -> Point2 -> DamageType -> Int -> World -> World
damageCircle r sp dt da w =
w
& cWorld . wallDamages %~ addwalldamages
& cWorld . creatures %~ addcreaturedamages
& cWorld . lWorld . wallDamages %~ addwalldamages
& cWorld . lWorld . creatures %~ addcreaturedamages
where
--addwalldamages wlds = runIdentity $ S.fold_ (damageWlCircle wldam) wlds id wlstodam
addwalldamages wlds = foldl' (damageWlCircle wldam) wlds wlstodam