refine pathfinding

This commit is contained in:
nek0 2018-05-14 19:34:07 +02:00
parent 72c8adb4f5
commit 1c9076c838

View file

@ -150,7 +150,7 @@ naviGraph imgmat (V2 r c) =
(\acc (or, oc) ->
if null (fromMaybe [] $
imgObstacle <$> M.safeGet (r + or) (c + oc) imgmat)
&& any null
&& all null
(map
(\(oor, ooc) -> fromMaybe [] $
imgObstacle <$> M.safeGet (r + oor) (c + ooc) imgmat)