{-
Collections of rooms that branch into multiple paths.
-}
module Dodge.Room.Branch
    where
--import Geometry
--import Dodge.LevelGen.Data
import Dodge.Data
import Dodge.Cleat
import Dodge.Room.Door
import Dodge.Room.Link
import Dodge.Room.Procedural
--import Dodge.LevelGen.Data
import Dodge.Tree

import Control.Monad.State
import System.Random

branchRectWith :: RandomGen g => State g (Tree Room) ->  State g (Tree Room)
branchRectWith t = do
    x <- state $ randomR (100,200)
    y <- state $ randomR (100,200)
    b <- t
    rt <- shuffleLinks $ roomRectAutoLinks x y
    return $ Node rt 
        [ pure $ cleatOnward door
        , treeFromTrunk [door] b
        ]
