Work towards cross-room placements
This commit is contained in:
@@ -15,6 +15,7 @@ module Dodge.Room.Link
|
||||
, randomiseOutLinks
|
||||
, randomiseLinksBy
|
||||
, invShiftLinkBy
|
||||
, setLastLinkToUsed
|
||||
) where
|
||||
import Dodge.LevelGen
|
||||
import Dodge.Room.Data
|
||||
@@ -105,3 +106,10 @@ shiftPathBy
|
||||
-> (Point2,Point2)
|
||||
-> (Point2,Point2)
|
||||
shiftPathBy s (p1,p2) = (shiftPointBy s p1, shiftPointBy s p2)
|
||||
|
||||
setLastLinkToUsed :: Room -> Room
|
||||
setLastLinkToUsed rm = case _rmLinks rm of
|
||||
(_:_) -> rm
|
||||
& rmLinks %~ init
|
||||
& rmUsedLinks %~ (uncurry InLink (last (_rmLinks rm)) :)
|
||||
_ -> rm
|
||||
|
||||
Reference in New Issue
Block a user