More strictifiiiying
This commit is contained in:
@@ -8,7 +8,7 @@ import Dodge.Room.Foreground
|
||||
import Dodge.Layout.Tree.Polymorphic
|
||||
import Dodge.LevelGen.Data
|
||||
--import Picture
|
||||
--import Geometry
|
||||
import Geometry.Data
|
||||
|
||||
import Data.Tree
|
||||
import Control.Monad.State
|
||||
@@ -16,20 +16,20 @@ import Control.Lens
|
||||
import System.Random
|
||||
|
||||
rezBox :: Room
|
||||
rezBox = shiftRoomBy ((-20,-10),0) $ roomRect 40 20 1 1 & rmPS .~ []
|
||||
rezBox = shiftRoomBy ((V2 (-20) (-10)),0) $ roomRect 40 20 1 1 & rmPS .~ []
|
||||
|
||||
startRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
startRoom = do
|
||||
w <- state $ randomR (100,400)
|
||||
h <- state $ randomR (200,400)
|
||||
let fground = sPS (0,0) 0 $ PutForeground $
|
||||
highPipe 80 (0,h/3) (w, h/2)
|
||||
++ highPipe 40 (0,h/2) (w, h/3)
|
||||
++ highPipe 60 (w/3,0) (w/3, h)
|
||||
let fground = sPS (V2 0 0) 0 $ PutForeground $
|
||||
highPipe 80 (V2 (0) (h/3)) (V2 (w) ( h/2))
|
||||
++ highPipe 40 (V2 (0) (h/2)) (V2 (w) ( h/3))
|
||||
++ highPipe 60 (V2 (w/3) (0)) (V2 (w/3) ( h))
|
||||
-- ++ highPipe 20 (0,2*h/3) (w, h/3)
|
||||
-- , girderV cola 10 (0,3*h/4) (w, 3*h/4)
|
||||
-- , girder colb 5 (0,5*h/8) (w, 5*h/8)
|
||||
treeFromPost [Left rezBox, Left door] . Right <$> randomiseOutLinks (shiftRoomBy ((-20,-20),0) $ roomRectAutoLinks w h & rmPS %~ (fground :))
|
||||
treeFromPost [Left rezBox, Left door] . Right <$> randomiseOutLinks (shiftRoomBy ((V2 (-20) (-20)),0) $ roomRectAutoLinks w h & rmPS %~ (fground :))
|
||||
-- where
|
||||
-- cola = dark . dark . light . light $ light red
|
||||
-- colb = dark . dark . light . light $ light blue
|
||||
|
||||
Reference in New Issue
Block a user