Some cleanup, sidetracked from inter-room placements

This commit is contained in:
2021-11-12 14:16:16 +00:00
parent 1d5b2ea765
commit 67e164c830
13 changed files with 160 additions and 116 deletions
+3 -5
View File
@@ -1,10 +1,8 @@
{-
Concerns link pairs of rooms.
{- Concerns link pairs of rooms.
Link pairs determine where rooms can attach to each other; each pair consists
of a position and a rotation.
The last link in the list is considered the incoming link, the other links are
the outgoing links.
-}
the outgoing links. -}
module Dodge.Room.Link
( shiftRoomToLink
, shiftRoomBy
@@ -111,5 +109,5 @@ setLastLinkToUsed :: Room -> Room
setLastLinkToUsed rm = case _rmLinks rm of
(_:_) -> rm
& rmLinks %~ init
& rmUsedLinks %~ (uncurry InLink (last (_rmLinks rm)) :)
& rmPos %~ (uncurry InLink (last (_rmLinks rm)) :)
_ -> rm