Fix backtracking bug
This commit is contained in:
@@ -118,14 +118,14 @@ shiftRoomBy shift r = r
|
||||
. (tileX %~ shiftPointBy shift )
|
||||
)
|
||||
& rmViewpoints %~ map (shiftPointBy shift)
|
||||
shiftRoomShiftToLink :: (Point2,Float) -> Room -> Room
|
||||
shiftRoomShiftToLink l r
|
||||
= shiftRoomShiftBy l
|
||||
. shiftRoomShiftBy (V2 0 0 , pi-a)
|
||||
$ shiftRoomShiftBy (V2 0 0 -.- p , 0)
|
||||
r
|
||||
where
|
||||
(p,a) = head $ _rmInLinks r
|
||||
--shiftRoomShiftToLink :: (Point2,Float) -> Room -> Room
|
||||
--shiftRoomShiftToLink l r
|
||||
-- = shiftRoomShiftBy l
|
||||
-- . shiftRoomShiftBy (V2 0 0 , pi-a)
|
||||
-- $ shiftRoomShiftBy (V2 0 0 -.- p , 0)
|
||||
-- r
|
||||
-- where
|
||||
-- (p,a) = head $ _rmInLinks r
|
||||
|
||||
shiftRoomShiftToLink' :: (Point2,Float) -> (Point2,Float) -> Room -> Room
|
||||
shiftRoomShiftToLink' l inlink r
|
||||
@@ -156,7 +156,7 @@ finalLinksUpdate :: Room -> Room
|
||||
finalLinksUpdate rm = case _rmInLinks rm of
|
||||
(_:_) -> rm
|
||||
& rmInLinks %~ tail
|
||||
& rmPos %~ ( (uncurry UsedInLink (head inlnks) :)
|
||||
& rmPos %~ ( (uncurry (UsedInLink 0) (head inlnks) :)
|
||||
. (map (uncurry UnusedLink) (outlnks ++ tail inlnks) ++) )
|
||||
_ -> rm
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user