From 9c9ec9c5538550f6cc4ca8e59714bb60689efd3c Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 11 Jun 2022 13:37:26 +0100 Subject: [PATCH] Cleanup --- src/Dodge/Room/Link.hs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Dodge/Room/Link.hs b/src/Dodge/Room/Link.hs index 3d465bc98..b2feb70ca 100644 --- a/src/Dodge/Room/Link.hs +++ b/src/Dodge/Room/Link.hs @@ -9,7 +9,6 @@ module Dodge.Room.Link , shiftLinkBy , doRoomShift , shuffleLinks - , chooseOneInLink , restrictRMInLinksPD ) where import Dodge.ShiftPoint @@ -23,21 +22,11 @@ import Data.Tile import Dodge.RoomLink import Control.Lens -import qualified Data.Set as S - -chooseOneInLink :: RandomGen g => Room -> State g Room -chooseOneInLink r = restrictToFstInLink <$> shuffleLinks r +--import qualified Data.Set as S restrictRMInLinksPD :: ((Point2,Float) -> Bool) -> Room -> Room restrictRMInLinksPD f = rmLinks %~ restrictLinkType InLink f -restrictToFstInLink :: Room -> Room -restrictToFstInLink = rmLinks %~ f - where - f (rl:xs) | S.member InLink (_rlType rl) = rl : restrictLinkType InLink (const False) xs - | otherwise = rl : f xs - f [] = [] - {- Shuffle the order of all links of a room randomly. - Note this does not change their types. -} shuffleLinks :: RandomGen g => Room -> State g Room