Make pathedge zoning use sets, probably doesn't help

This commit is contained in:
2022-08-24 14:01:39 +01:00
parent 13b07b53ce
commit 6973663055
16 changed files with 68 additions and 53 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
module Dodge.Block where
import Data.Set (Set)
import Dodge.Data.MountedObject
import Control.Lens
import Data.Foldable
@@ -64,7 +65,7 @@ destroyBlock bl w =
ps = replicateM 25 (randInCirc 20) & evalState $ _randGen w
-- this does not handle eg doors blocking the path as well
maybeClearPaths :: [(Int, Int, PathEdge)] -> World -> World
maybeClearPaths :: Set (Int, Int, PathEdge) -> World -> World
maybeClearPaths ps w = foldl' maybeClearPath w ps
maybeClearPath :: World -> (Int, Int, PathEdge) -> World