Move toward better info display during level generation

This commit is contained in:
2021-11-10 23:40:04 +00:00
parent 9aefc11e17
commit a195157e54
13 changed files with 122 additions and 118 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
{-# LANGUAGE TupleSections #-}
--{-# LANGUAGE TupleSections #-}
module Dodge.Layout
where
import Dodge.Data
@@ -27,7 +27,7 @@ import Polyhedra
import Polyhedra.Data
import Data.List (nubBy)
import Control.Monad.State
--import Control.Monad.State
import Control.Lens
import System.Random
import Data.Tree
@@ -37,7 +37,7 @@ import Data.Foldable
import qualified Control.Foldl as L
import Data.Maybe
generateLevelFromRoomList :: State StdGen [Room] -> World -> World
generateLevelFromRoomList :: [Room] -> World -> World
generateLevelFromRoomList gr w
= initWallZoning
. setupWorldBounds
@@ -51,7 +51,7 @@ generateLevelFromRoomList gr w
where
path = pairsToGraph dist pairPath
pairPath = concatMap _rmPath rs
rs = zipWith addTile zs . evalState gr $ _randGen w
rs = zipWith addTile zs gr
zs = map fromIntegral $ randomRs (0,63::Int) $ _randGen w
doRoomPlacements :: World -> Room -> World