Move streaming data into its own file
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
module Dodge.Wall.Zone
|
||||
where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
import Dodge.Zone
|
||||
import Dodge.Base
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
--import Data.Foldable
|
||||
--import Streaming
|
||||
import qualified Streaming.Prelude as S
|
||||
--import qualified Streaming.Prelude as S
|
||||
|
||||
insertWallInZones :: Wall -> World -> World
|
||||
insertWallInZones wl = wlZoning %~ insertInZoning (IM.insert (_wlID wl)) wl
|
||||
--insertWallInZones wl = wlZoning . znObjects
|
||||
insertWallInZones wl = wlZoning %~ updateZoning (IM.insert (_wlID wl)) wl
|
||||
--insertWallInZones wl = wlZoning .updatets
|
||||
-- %~ (runIdentity . (\wlzns -> S.fold_ doinsert wlzns id (zoneOfWall wl)))
|
||||
-- where
|
||||
-- doinsert wlzns (V2 x y) = insertIMInZone x y (_wlID wl) wl wlzns
|
||||
|
||||
deleteWallFromZones :: Wall -> World -> World
|
||||
deleteWallFromZones wl = wlZoning %~ insertInZoning (const $ IM.delete (_wlID wl)) wl
|
||||
-- %~ flip (foldl' (flip $ \(a,b) -> deleteIMInZone a b (_wlID wl))) (zoneOfWall wl)
|
||||
deleteWallFromZones wl = wlZoning %~ updateZoning (const $ IM.delete (_wlID wl)) wl
|
||||
-- %~ flip (foldl' (flip $ \(a,b) updateeIMInZone a b (_wlID wl))) (zoneOfWall wl)
|
||||
|
||||
Reference in New Issue
Block a user