This commit is contained in:
2025-10-24 18:50:09 +01:00
parent 488428b1ef
commit ccb809a090
9 changed files with 36 additions and 78 deletions
+3 -3
View File
@@ -36,8 +36,8 @@ updateEdgeWallObs :: World -> (Int, Int) -> World
updateEdgeWallObs w (i, j) = fromMaybe w $ do
s <- getNodePos i w
e <- getNodePos j w
--let wlflags = foldMap (^. _2 . wlPathFlag) $ wlsHitUnsorted s e w
let wlflags = foldMap (getWallPathing . (^. _2)) $ wlsHitUnsorted s e w
let wlflags = foldMap (^. _2 . to getWallPathing) $ wlsHitUnsorted s e w
return $ w & cWorld . incGraph %~ updateEdge (f wlflags) (i, j)
where
f x _ = S.map WallObstacle x
f x y = (S.map WallObstacle x) `S.union`
(y S.\\ (S.fromList $ map WallObstacle [minBound..maxBound]))