Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+13 -15
View File
@@ -1,28 +1,26 @@
{-
Collections of rooms that branch into multiple paths.
-}
module Dodge.Room.Branch
where
--import Geometry
--import Dodge.LevelGen.Data
import Dodge.Data
module Dodge.Room.Branch where
import Control.Monad.State
import Dodge.Cleat
import Dodge.Data.GenWorld
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 :: RandomGen g => State g (Tree Room) -> State g (Tree Room)
branchRectWith t = do
x <- state $ randomR (100,200)
y <- state $ randomR (100,200)
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
]
return $
Node
rt
[ pure $ cleatOnward door
, treeFromTrunk [door] b
]