This commit is contained in:
2022-06-11 14:37:05 +01:00
parent 9c9ec9c553
commit de71c61409
18 changed files with 107 additions and 134 deletions
+4 -6
View File
@@ -36,10 +36,8 @@ padSucWithDoors (Node x xs) = Node x (map (padWithAno [SpecificRoom thetree]) xs
thetree = do
thecor <- shuffleLinks corridor
takeOne
[ (toOnward "door", return (useAll door))
, (toOnward "twoDoors"
,treeFromPost [ door, thecor] (useAll door)
)
[ (toOnward "door", return (cleatOnward door))
, (toOnward "twoDoors" ,treePost [ door, thecor, cleatOnward door])
]
{- Add one to three corridors between each parent-child link of a tree of annotations. -}
@@ -71,7 +69,7 @@ anoToRoomTree' anos = case anos of
[OrAno as] -> do
a <- takeOne as
anoToRoomTree' a
[Corridor] -> pure . useAll <$> shuffleLinks corridor
[Corridor] -> pure . cleatOnward <$> shuffleLinks corridor
(BossAno cr : _) -> do
br <- bossRoom cr
branchRectWith . pure $ treeFromPost [corridor,corridor] br
@@ -79,4 +77,4 @@ anoToRoomTree' anos = case anos of
_ -> do
w <- state $ randomR (100,400)
h <- state $ randomR (200,400)
fmap (pure . useAll) . shuffleLinks $ roomRectAutoLinks w h
fmap (pure . cleatOnward) . shuffleLinks $ roomRectAutoLinks w h