Refactor world events

This commit is contained in:
2022-07-22 14:30:53 +01:00
parent 7fdb70dd1c
commit 43e7d20b21
14 changed files with 95 additions and 40 deletions
+20
View File
@@ -0,0 +1,20 @@
module Dodge.Zoning.Base where
--zoneOfCirc :: Float -> Point2 -> Float -> [Int2]
--zoneOfCirc zsize p r = zoneOfRect' x (p +.+ V2 r r) (p -.- V2 r r)
--
--zoneOfRect' :: Float -> Point2 -> Point2 -> [Int2]
--zoneOfRect' s sp ep = [V2 x y | x <- makeInterval sx ex, y <- makeInterval sy ey]
-- where
-- V2 sx sy = zoneOfPoint s sp
-- V2 ex ey = zoneOfPoint s ep
--
--zoneOfPoint :: Float -> Point2 -> Int2
--{-# INLINE zoneOfPoint #-}
--zoneOfPoint s = fmap (divTo s)
--
--zoneExtract :: Monoid m => Int2 -> IM.IntMap (IM.IntMap m) -> m
--zoneExtract (x,y) = ix x . ix y
--
--zonesExtract :: Monoid m => [Int2] -> IM.IntMap (IM.IntMap m) -> m
--zonesExtract xs = fold (flip zoneExtract xs)
+7
View File
@@ -0,0 +1,7 @@
module Dodge.Zoning.Creature where
--zoneOfCr :: Creature -> [Int2]
--zoneOfCr cr = zoneOfCirc crZoneSize (_crPos cr) (_crRad cr)
--crsInZones :: [Int2] -> CrZoning -> IS.IntSet
--crsInZones is