Cleanup warnings
This commit is contained in:
@@ -5,7 +5,7 @@ module Dodge.Layout.Generate
|
||||
where
|
||||
import Data.Tree
|
||||
import Control.Monad.State
|
||||
import System.Random
|
||||
--import System.Random
|
||||
|
||||
generateLayout :: State g (Tree RoomProperties)
|
||||
generateLayout = undefined
|
||||
@@ -16,10 +16,10 @@ data RoomProperties = RProps
|
||||
}
|
||||
|
||||
randomTreeStructure :: Int -> State g (Tree ())
|
||||
randomTreeStructure i = undefined
|
||||
randomTreeStructure = undefined
|
||||
|
||||
treeMaxDepthFromTrunk :: Int -> Int -> State g (Tree ())
|
||||
treeMaxDepthFromTrunk nNodes maxDepth = do
|
||||
treeMaxDepthFromTrunk = do
|
||||
undefined
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Combining and composing trees.
|
||||
-}
|
||||
module Dodge.Layout.Tree
|
||||
where
|
||||
import Data.Tree
|
||||
import Control.Monad.State
|
||||
import System.Random
|
||||
--import Data.Tree
|
||||
--import Control.Monad.State
|
||||
--import System.Random
|
||||
|
||||
|
||||
@@ -30,8 +30,9 @@ appendEitherTree
|
||||
-> [Tree (Either a a)] -- ^ The forest to append
|
||||
-> Tree (Either a a)
|
||||
appendEitherTree (Node (Left x) ts) ts' = Node (Left x) $ map (`appendEitherTree` ts') ts
|
||||
appendEitherTree (Node (Right x) ts) ts' = Node (Left x) ts'
|
||||
appendEitherTree (Node (Right x) _) ts' = Node (Left x) ts'
|
||||
|
||||
removeEither :: Either p p -> p
|
||||
removeEither (Left y) = y
|
||||
removeEither (Right y) = y
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@ shiftRoomTreeSearch
|
||||
shiftRoomTreeSearch _ Empty = Just []
|
||||
shiftRoomTreeSearch bs (Node r ts :<| ts')
|
||||
| roomIsClipping = Nothing
|
||||
| otherwise = fmap (r :) . shiftRoomTreeSearch newBounds $ ts' >< children
|
||||
| otherwise = fmap (r :) . shiftRoomTreeSearch newBounds $ ts' >< chldren
|
||||
where
|
||||
roomIsClipping = or (polysIntersect <$> _rmBound r <*> bs)
|
||||
newBounds = _rmBound r ++ bs
|
||||
children = fromList $ zipWith (applyToRoot . shiftRoomToLink) (_rmLinks r) ts
|
||||
chldren = fromList $ zipWith (applyToRoot . shiftRoomToLink) (_rmLinks r) ts
|
||||
{- |
|
||||
All: Depth first search of trees of rooms, produces a list of lists of rooms that are not clipping.
|
||||
-}
|
||||
|
||||
Reference in New Issue
Block a user