Commit before making all walls zoned

This commit is contained in:
2021-09-30 13:36:07 +01:00
parent d7f975d40e
commit eb393708c4
7 changed files with 34 additions and 25 deletions
+4 -2
View File
@@ -156,8 +156,10 @@ wallsAlongLine a b w = IM.foldlWithKey' g IM.empty kps
wallsAlongCirc :: Point2 -> Float -> World -> IM.IntMap Wall
wallsAlongCirc p r w = IM.unions [f y $ f x $ _znObjects $ _wallsZone w | (x,y) <- zoneOfCircle p r]
where f i m = case IM.lookup i m of Just val -> val
_ -> IM.empty
where
f i m = case IM.lookup i m of
Just val -> val
_ -> IM.empty
wallsNearPoint :: Point2 -> World -> IM.IntMap Wall
wallsNearPoint p w = IM.unions [f b $ f a $ _znObjects $ _wallsZone w | a<-[x-1,x,x+1] , b<-[y-1,y,y+1]]