From 1c9076c838c00049e4624d39df1134104a7793bf Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 14 May 2018 19:34:07 +0200 Subject: [PATCH] refine pathfinding --- src/Util.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util.hs b/src/Util.hs index a26e94b..aa74520 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -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)