Minor cleanup

This commit is contained in:
2021-11-23 20:48:31 +00:00
parent 1f2d767d5e
commit b7d6eeaa84
4 changed files with 15 additions and 15 deletions
+10 -10
View File
@@ -4,9 +4,9 @@ of a position and a rotation.
The last link in the list is considered the incoming link, the other links are
the outgoing links. -}
module Dodge.Room.Link
( shiftRoomToLink
( --shiftRoomToLink
--, shiftRoomShiftToLink
, shiftRoomShiftToLink'
shiftRoomShiftToLink'
, shiftRoomBy
, shiftLinkBy
, doRoomShift
@@ -92,14 +92,14 @@ changeLinkTo cond r = do
an external point and direction.
This is intended to work when the external point is an outgoing link from another room.
-}
shiftRoomToLink :: (Point2,Float) -> Room -> Room
shiftRoomToLink l r
= shiftRoomBy l
. shiftRoomBy (V2 0 0 , pi-a)
$ shiftRoomBy (V2 0 0 -.- p , 0)
r
where
(p,a) = lnkPosDir $ head $ _rmInLinks r
--shiftRoomToLink :: (Point2,Float) -> Room -> Room
--shiftRoomToLink l r
-- = shiftRoomBy l
-- . shiftRoomBy (V2 0 0 , pi-a)
-- $ shiftRoomBy (V2 0 0 -.- p , 0)
-- r
-- where
-- (p,a) = lnkPosDir $ head $ _rmInLinks r
doRoomShift :: Room -> Room
doRoomShift rm = shiftRoomBy (_rmShift rm) rm & rmShift .~ _rmShift rm