Implement terminals

This commit is contained in:
2022-03-14 20:39:23 +00:00
parent 1b6f11709c
commit f16f32d9d3
30 changed files with 313 additions and 119 deletions
+7
View File
@@ -2,6 +2,7 @@
{- | Basic collision detection for a moving point -}
module Dodge.Base.Collide
( hasLOS
, hasButtonLOS
, reflectPointWalls
, ssfold
, collidePointUpToIndirectMinDist
@@ -25,6 +26,12 @@ hasLOS :: Point2 -> Point2 -> World -> Bool
{-# INLINE hasLOS #-}
hasLOS p1 p2 = not . pointHitsWalls p1 p2 . wallsAlongLine p1 p2
hasButtonLOS :: Point2 -> Point2 -> World -> Bool
{-# INLINE hasButtonLOS #-}
hasButtonLOS p1 p2 = not . pointHitsWalls p1 p2
. IM.filter (not . _wlTouchThrough)
. wallsAlongLine p1 p2
--hitPointLines
-- :: Point2
-- -> Point2