Assorted changes, cleanup menu selection text
This commit is contained in:
@@ -79,7 +79,7 @@ pointHitsWalls p1 p2
|
||||
collidePointWalkable :: Point2 -> Point2 -> IM.IntMap Wall -> Bool
|
||||
collidePointWalkable p1 p2 ws
|
||||
= any (isJust . uncurry (intersectSegSeg p1 p2) . _wlLine)
|
||||
$ IM.filter (fromMaybe True . (^? wlPathable)) ws
|
||||
$ IM.filter (not . fromMaybe True . (^? wlPathable)) ws
|
||||
|
||||
--furthestPointWalkable :: Point2 -> Point2 -> IM.IntMap Wall -> Point2
|
||||
--furthestPointWalkable p1 p2 ws
|
||||
@@ -179,7 +179,8 @@ hasLOSIndirect p1 p2 w = case collidePointIndirect' p1 p2 $ wallsAlongLine p1 p2
|
||||
isWalkable :: Point2 -> Point2 -> World -> Bool
|
||||
isWalkable p1 p2 w = not
|
||||
$ collidePointWalkable p1 p2
|
||||
$ wallsAlongLine p1 p2 w
|
||||
$ _walls w
|
||||
-- $ wallsAlongLine p1 p2 w
|
||||
|
||||
canSee :: Int -> Int -> World -> Bool
|
||||
canSee i j w = hasLOS p1 p2 w
|
||||
|
||||
Reference in New Issue
Block a user