Cleanup warnings
This commit is contained in:
@@ -103,21 +103,19 @@ hasLOSIndirect p1 p2 w = case collidePointIndirect p1 p2 $ wallsAlongLine p1 p2
|
||||
Nothing -> True
|
||||
|
||||
isWalkable :: Point2 -> Point2 -> World -> Bool
|
||||
isWalkable p1 p2 w = not $ collidePointWalkable p1 p2 nearbyWalls
|
||||
where
|
||||
nearbyWalls = wallsAlongLine p1 p2 w
|
||||
isWalkable p1 p2 w = not
|
||||
$ collidePointWalkable p1 p2
|
||||
$ wallsAlongLine p1 p2 w
|
||||
|
||||
canSee :: Int -> Int -> World -> Bool
|
||||
canSee i j w = hasLOS p1 p2 w
|
||||
where
|
||||
p1 = _crPos (_creatures w IM.! i)
|
||||
p2 = _crPos (_creatures w IM.! j)
|
||||
nearbyWalls = wallsAlongLine p1 p2 w
|
||||
|
||||
canSeePoint :: Int -> Point2 -> World -> Bool
|
||||
canSeePoint i p w = hasLOS p1 p w
|
||||
where
|
||||
nearbyWalls = wallsAlongLine p1 p w
|
||||
p1 = _crPos (_creatures w IM.! i)
|
||||
|
||||
pathToPointFireable :: Int -> Point2 -> World -> Bool
|
||||
@@ -133,7 +131,6 @@ canSeePointAll i targPos w
|
||||
= all (flip (canSeePoint i) w . (\p -> targPos +.+ radius *.* p)) [(1,0),(0,1),(-1,0),(0,-1)]
|
||||
where
|
||||
cr = _creatures w IM.! i
|
||||
cpos = _crPos cr
|
||||
radius = _crRad cr
|
||||
|
||||
canSeeAny :: Int -> Int -> World -> Bool
|
||||
|
||||
Reference in New Issue
Block a user