Cleanup creatures somewhat, fix LOS to LOSIndirect

This commit is contained in:
2022-07-03 15:07:55 +01:00
parent b43ec42a2e
commit ffdfaa41c0
24 changed files with 81 additions and 116 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ makePathBetweenPs :: Point2 -> Point2 -> World -> Maybe [Point2]
makePathBetweenPs a b w = mapMaybe (lab $ _pathGraph w) <$> makePathBetween a b w
pointTowardsImpulse :: Point2 -> Point2 -> World -> Maybe Point2
pointTowardsImpulse a b w = find (flip (isWalkable a) w) =<< makePathBetweenPs a b w
pointTowardsImpulse a b w = (find (flip (isWalkable a) w) . reverse) =<< makePathBetweenPs a b w
------ continues a walk from a list of points, without repetitions
------ supposes that the list is non-empty