Cleanup
This commit is contained in:
@@ -48,11 +48,6 @@ randomPadCorridors (Node x xs) = do
|
||||
n <- state $ randomR (1, 3)
|
||||
xs' <- mapM randomPadCorridors xs
|
||||
return $ treeFromTrunk (replicate n [Corridor]) (Node x xs')
|
||||
{- | Add a corridor to a random out-link of a room. -}
|
||||
roomThenCorridor :: RandomGen g => Room -> State g (Tree Room)
|
||||
roomThenCorridor theRoom = fmap
|
||||
(\r -> Node ( theRoom) [(pure . useAll) r])
|
||||
(shuffleLinks corridor)
|
||||
|
||||
{- | Create a random room tree structure from a list of annotations. -}
|
||||
anoToRoomTree :: [Annotation] -> State StdGen (Room -> Maybe ([String],Room), Tree Room)
|
||||
@@ -67,10 +62,8 @@ anoToRoomTree anos = case anos of
|
||||
let lr = snd lr'
|
||||
keyroom' <- fromJust $ lookup ii ks
|
||||
let keyroom = snd keyroom'
|
||||
return (toOnward ("PassthroughLockKeyLists-"++show ii)
|
||||
, overwriteLabel 0 lr [keyroom]
|
||||
)
|
||||
_ -> (toOnward "no label" ,) <$> anoToRoomTree' anos
|
||||
rToOnward ("PassthroughLockKeyLists-"++show ii) $ overwriteLabel i lr [keyroom]
|
||||
_ -> rToOnward "no label" =<< anoToRoomTree' anos
|
||||
|
||||
{- | Create a random room tree structure from a list of annotations. -}
|
||||
anoToRoomTree' :: [Annotation] -> State StdGen (Tree Room)
|
||||
|
||||
Reference in New Issue
Block a user